RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomWinSocket.Disconnect Method

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

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

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

Disconnect calls the Lock method to make sure the method is thread-safe. Then, it generates an OnSocketEvent of type seDisconnect. After the OnSocketEvent, Disconnect closes the connection. Finally, it calls Unlock to end the critical section started by Lock

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!