TcpSocket
. User code can define a handler for retrieving data and detecting disconnects on a socket by using Handle.Tcp
method:port
: local port on which incoming TCP connections should be accepted.tcpSocket
: active socket object. This object can be used to send data, disconnect socket, etc. When incoming data
is null
it means that socket was disconnected.data
: incoming data on TCP socket.TcpSocket
class has the following notable methods:UInt64 ToUInt64()
: identifier that represents the TCP socket, normally used for storage in user code.void Disconnect()
: disconnects an active TCP socket.void Send(Byte[] data)
: sends given data on active TCP socket.Boolean IsDead()
: checks if TCP socket object is still active.static TcpSocket Current
: currently active TCP socket for this scheduler.Send
) will actually be performed is not guaranteed to be the same as the order in which they were initiated.