-
Notifications
You must be signed in to change notification settings - Fork 3
ThorIO.ITransport
Magnus Thor edited this page Feb 8, 2017
·
3 revisions
###ThorIO.ITransport
TBD
###Custom transports
To create a custom transport (protocol) implement this interface.
interface ITransport {
id: string
send(data: any)
close(reason: number, message: any)
addEventListener(topic: string, fn: Function)
socket: any;
readyState: number;
ping()
onMessage: (message: TransportMessage) => void
}
###Built-in Transports (Protocols)
ThorIO contains three built-in transports. One that is used when connecting WebSocket clients to the engine using the engine.addWebSocket method and two very simple transports that you can use for instance with telnet, putty, micro-controllers. See ThorIO.Client.NodeJSClient