TcpSocketManager service
Instanciating the service#
Load the following scripts:
You can then get an instance of the service with code similar to:
Then the developer can use _tcpsocketManager as TcpSocketManager service instance.
This service implements the TcpSocketFactory interface.
SocketAddress dictionnary#
TcpSocket Interface#
Methods#
close()
Resolves with void
Rejects with void
resume()
Resolves with void
Rejects with void
// data: arraybuffer
send(data)
Resolves with boolean
Rejects with void
suspend()
Resolves with void
Rejects with void
Events#
The CLOSE event emits a void
To manage this event, use code similar to:
The DATA event emits a arraybuffer
To manage this event, use code similar to:
The DRAIN event emits a boolean
To manage this event, use code similar to:
The ERROR event emits a string
To manage this event, use code similar to:
TcpSocketFactory Interface#
Methods#
  open
// addr: SocketAddress
open(addr)
Resolves with TcpSocket
Rejects with void