TsgcTCPClient › Events

TsgcTCPClient Events

Events you can handle, grouped by purpose, followed by the full alphabetical list.

Lifecycle

NameDescription
OnConnectFires when the TCP connection to the server has been successfully established.
OnDisconnectFires when the TCP connection has been dropped or closed.
OnErrorFires every time a non-fatal error is reported on the TCP connection.
OnExceptionFires whenever an unhandled exception is raised while processing the TCP connection.

Data

NameDescription
OnMessageFires when raw bytes received from the TCP server can be surfaced as text.
OnBinaryFires when raw bytes have been received from the TCP server.

Reliability

NameDescription
OnBeforeHeartBeatFires before each HeartBeat tick so the application can send a custom keep-alive payload.
OnBeforeWatchDogFires before each WatchDog reconnection attempt so the application can adjust the target server or suppress the retry.

Security

NameDescription
OnSSLGetHandlerFires before the SSL handler is created so a custom handler instance can be supplied.
OnSSLAfterCreateHandlerFires after the SSL handler has been created so its properties can be customized.
OnSSLVerifyPeerFires when VerifyCertificate is enabled so the application can accept or reject the server certificate.
OnSChannelVerifyPeerFires when SChannel is the TLS IOHandler so the application can verify the server certificate.

All Events (alphabetical)

NameDescription
OnBeforeHeartBeatFires before each HeartBeat tick so the application can send a custom keep-alive payload.
OnBeforeWatchDogFires before each WatchDog reconnection attempt so the application can adjust the target server or suppress the retry.
OnBinaryFires when raw bytes have been received from the TCP server.
OnConnectFires when the TCP connection to the server has been successfully established.
OnDisconnectFires when the TCP connection has been dropped or closed.
OnErrorFires every time a non-fatal error is reported on the TCP connection.
OnExceptionFires whenever an unhandled exception is raised while processing the TCP connection.
OnMessageFires when raw bytes received from the TCP server can be surfaced as text.
OnSChannelVerifyPeerFires when SChannel is the TLS IOHandler so the application can verify the server certificate.
OnSSLAfterCreateHandlerFires after the SSL handler has been created so its properties can be customized.
OnSSLGetHandlerFires before the SSL handler is created so a custom handler instance can be supplied.
OnSSLVerifyPeerFires when VerifyCertificate is enabled so the application can accept or reject the server certificate.