Transport beta
Interface of @v12-engine/engine
ts
export interface TransportOne end of a connection: text in, text out, in order
Members
close
ts
close(): void;Closes the connection; the other end's onClose handler is told
onClose
ts
onClose(handler: () => void): void;Told when the other end closes
onMessage
ts
onMessage(handler: (message: string) => void): void;What comes in from the other end. One handler: a later one takes the place of the one before
send
ts
send(message: string): void;Sends one text message to the other end