API: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.

System.Win.ScktComp.TServerWinSocket.Disconnect inherits from System.Win.ScktComp.TCustomWinSocket.Disconnect. All content below this line refers to System.Win.ScktComp.TCustomWinSocket.Disconnect.

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

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.

See Also