Class SocketMixin<API, Loc>
Properties
Protected Abstract socketHandlers
socketHandlers: any
Private waiters
waiters: object
Type declaration
[ event: string ]: object
[ startTime: number ]: object
reject: Function
resolve: Function
timeoutId: any
Methods
blockEvent
blockEvent<Event>( event: Event , timeout?: number ) : Promise < any >
Type parameters
Parameters
event: Event
Default value timeout: number = 5000
Returns Promise < any >
Protected handleEvent
handleEvent( ctx: unknown , event: string , ... args: any [] ) : void
Parameters
ctx: unknown
event: string
Rest ... args: any []
Returns void
Protected Abstract reply
reply( ctx: any , response: Response < string , API[Loc] , Loc > ) : any
Parameters
ctx: any
response: Response < string , API[Loc] , Loc >
Returns any
Legend
Module
Object literal
Variable
Function
Function with type parameter
Index signature
Type alias
Enumeration
Enumeration member
Property
Method
Interface
Interface with type parameter
Constructor
Property
Method
Index signature
Class
Class with type parameter
Constructor
Property
Method
Accessor
Index signature
Inherited constructor
Inherited property
Inherited method
Inherited accessor
Protected property
Protected method
Protected accessor
Private property
Private method
Private accessor
Static property
Static method
Mixin for shared socket functionality between the server and client.