smartsocket/dist/smartsocket.classes.socketrequest.d.ts

26 lines
1.1 KiB
TypeScript
Raw Normal View History

import { ISocketFunctionRequestObject, ISocketFunctionResponseObject } from "./smartsocket.classes.socketfunction";
2016-08-09 09:42:21 +00:00
import { Objectmap } from "lik";
export declare type TSocketRequestStatus = "new" | "pending" | "finished";
export declare type TSocketRequestSide = "requesting" | "responding";
export interface SocketRequestConstructorOptions {
side: TSocketRequestSide;
shortid: string;
requestData?: ISocketFunctionRequestObject;
responseData?: ISocketFunctionResponseObject;
2016-08-09 09:42:21 +00:00
}
export declare let allRequestingSocketRequests: Objectmap<SocketRequest>;
export declare let allRespondingSocketRequests: Objectmap<SocketRequest>;
export declare class SocketRequest {
status: TSocketRequestStatus;
side: TSocketRequestSide;
shortid: string;
requestData: ISocketFunctionRequestObject;
responseData: ISocketFunctionResponseObject;
2016-08-09 09:42:21 +00:00
constructor(optionsArg: SocketRequestConstructorOptions);
private _sendRequest(dataArg);
private _receiveRequest(dataArg);
private _sendResponse(dataArg);
private _receiveResponse(dataArg);
private _dispatch(dataArg);
2016-08-09 09:42:21 +00:00
}