Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get the number of client and the connect/disconnect events in Synapse ?

I'm trying to use Synapse(TTCPBlockSocket) instead of Indy,but through the official help and demo i can't understand how to get the number of TCP client,and i didn't found the connect/disconnect events about Synapse,please give me some hint or sample code. Thanks in advance !

like image 272
PFeng Avatar asked Jun 05 '26 10:06

PFeng


1 Answers

As TLama notes in the comments, each incoming connection shuold fire the OnStatus event with HR_Accept. If I look over the TBlockSocket source, each disconnect, either by protocol or by error, should fire an OnStatus event with the HR_SocketClose reason on the connection socket.

like image 93
Stijn Sanders Avatar answered Jun 07 '26 23:06

Stijn Sanders



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!