import * as plugins from './smartsocket.plugins.js'; import { type ISocketFunctionCallDataRequest, type ISocketFunctionCallDataResponse } from './smartsocket.classes.socketfunction.js'; import { SocketConnection } from './smartsocket.classes.socketconnection.js'; import { Smartsocket } from './smartsocket.classes.smartsocket.js'; import { SmartsocketClient } from './smartsocket.classes.smartsocketclient.js'; export type TSocketRequestStatus = 'new' | 'pending' | 'finished'; export type TSocketRequestSide = 'requesting' | 'responding'; /** * interface of constructor of class SocketRequest */ export interface ISocketRequestConstructorOptions { side: TSocketRequestSide; originSocketConnection: SocketConnection; shortId: string; funcCallData: ISocketFunctionCallDataRequest; } /** * request object that is sent initially and may or may not receive a response */ export interface ISocketRequestDataObject { funcCallData: ISocketFunctionCallDataRequest | ISocketFunctionCallDataResponse; shortId: string; responseTimeout?: number; } export declare class SocketRequest { static getSocketRequestById(smartsocketRef: Smartsocket | SmartsocketClient, shortIdArg: string): SocketRequest; status: TSocketRequestStatus; side: TSocketRequestSide; shortid: string; originSocketConnection: SocketConnection; funcCallData: ISocketFunctionCallDataRequest; done: plugins.smartpromise.Deferred>; smartsocketRef: Smartsocket | SmartsocketClient; constructor(smartsocketRefArg: Smartsocket | SmartsocketClient, optionsArg: ISocketRequestConstructorOptions); /** * dispatches a socketrequest from the requesting to the receiving side */ dispatch(): Promise>; /** * handles the response that is received by the requesting side */ handleResponse(responseDataArg: ISocketRequestDataObject): Promise; /** * creates the response on the responding side */ createResponse(): Promise; }