RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TServerWinSocket.Disconnect Method

Shuts down the socket connection represented by a Windows socket handle.

Pascal
procedure Disconnect(Socket: TSocket); override;
C++
virtual __fastcall Disconnect(TSocket Socket);

Disconnect is called by the Close method to terminate the socket connection. 

Disconnect calls the Lock method to make sure the method is thread-safe. Then, it terminates all open connections to client sockets. Next it generates an OnSocketEvent of type seDisconnect. Finally, it closes the listening connection and calls Unlock to end the critical section started by Lock

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!