If you implement custom commands on Diarkis server, you may invoke those commands by sending custom commands.
// ver = command version |
TCP Client Event - OnConnect
The event is raised when a connection is successfully established.
OnException is raised if the connection establishment fails.
tcp.OnCreate += OnTcpCreate; |
TCP Client Event - OnException
The event is raised when an exception is caught internally or the Connect method fails.
tcp.OnException += OnTcpException; |
TCP Client Event - OnHeartbeat
TCP client sends and receives a heartbeat packet at a certain interval (Default every 5 seconds) to keep the connection “alive”. The event is raised when the client receives a response back from the server cluster.
tcp.OnHeartbeat += OnTcpHeartbeat; |
TCP Client Event - OnOffline
The event is raised when the connected server is preparing to go offline. The client is recommended to terminate the current connection and re-establish a new connection when this event is raised.
tcp.OnOffline += OnTcpOffline; |
TCP Event - OnDisconnect
The event is raised when the client successfully disconnects from Diarkis server cluster.
tcp.OnDisconnect += OnTcpDisconnect; |
TCP Event - OnPush
The event is raised when the client receives a packet as a push (packets that are not requested by the client) from Diarkis server cluster.
tcp.OnPush += OnTcpPush; break; |