System.Win.ScktComp.TServerWinSocket.Disconnect

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure Disconnect(Socket: TSocket); override;

C++

virtual void __fastcall Disconnect(NativeInt Socket);

Properties

Type Visibility Source Unit Parent
procedure
function
public
System.Win.ScktComp.pas
System.Win.ScktComp.hpp
System.Win.ScktComp TServerWinSocket

Description

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

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.

See Also