System.Win.ScktComp.TCustomWinSocket.Disconnect

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure Disconnect(Socket: TSocket); virtual;

C++

virtual void __fastcall Disconnect(int Socket);

Properties

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

Description

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