TROAsyncSocket
Overview
Location
- Unit: uROAsyncSocket.pas
- Ancestry: TROSocket | TROAsyncSocket
constructor Create (declared in TROSocket)
Creates a new instance.
constructor Create
constructor Create (TROSocketMode) overload
Creates a new instance with a supplied values.
constructor Create(aMode: TROSocketMode)
Parameters:
- aMode: Mode
constructor Create (TROSocketMode, THandle) overload
Creates a new instance with a supplied values.
constructor Create(aMode: TROSocketMode; aHandle: THandle)
Parameters:
- aMode:
- aHandle:
AbortSocket (declared in TROSocket)
procedure AbortSocket
Accept (declared in TROSocket)
function Accept: THandle
Active
property Active: Boolean read write
BeginDisconnect
procedure BeginDisconnect(aCallback: TROSocketCallback; aCallBack_name: string)
Parameters:
- aCallback:
- aCallBack_name:
BeginSend
procedure BeginSend(aData: Pointer; aStart: Integer; aLength: Integer; aCallback: TROSocketCallback; aCallBack_name: string)
Parameters:
- aData:
- aStart:
- aLength:
- aCallback:
- aCallBack_name:
Bind (declared in TROSocket)
procedure Bind(IP: string; Port: Word)
Parameters:
- IP:
- Port:
CanRead override
function CanRead(aTimeout: Integer): Boolean
Parameters:
- aTimeout:
CloseSocket (declared in TROSocket)
procedure CloseSocket
Connect (declared in TROSocket)
procedure Connect(IP: string; Port: Word)
Parameters:
- IP:
- Port:
CreateSocket (declared in TROSocket)
procedure CreateSocket
EndAccept
function EndAccept: TROAsyncSocket
EndDisconnect
Clean up a broken connection.
procedure EndDisconnect
EndSend
If the socket is not buffered (Buffered=False
), this method returns the result of calling the instrumental IntEndSend method.
Otherwise, it returns the amount of data recorded by the BufferedSendCallback and clears the callback registered by BeginSend.
function EndSend: Integer
ExceptCheck (declared in TROSocket)
procedure ExceptCheck(aRaiseExcept: Boolean; aAbortSocket: Boolean)
Parameters:
- aRaiseExcept:
- aAbortSocket:
GetErrorDescEx (declared in TROSocket)
function GetErrorDescEx: string
GetLocalIp
Retrieves the local endpoint of the transport layer.
function GetLocalIp: string
GetLocalPort
Retrieves the numeric value associated with the offered service by the transport layer.
function GetLocalPort: Integer
GetLocalSinIP (declared in TROSocket)
function GetLocalSinIP: string
GetRemoteIp
Retrieves the IP of the peer.
function GetRemoteIp: string
GetRemotePort
Gets the port of the peer used for communication.
function GetRemotePort: Integer
GetRemoteSinIP (declared in TROSocket)
function GetRemoteSinIP: string
GetSins (declared in TROSocket)
procedure GetSins
IdleTimeout
Determines the admissible interval in seconds between send or receive operations.
property IdleTimeout: Integer read write
IsValidSocket (declared in TROSocket)
function IsValidSocket: Boolean
LastError (declared in TROSocket)
property LastError: Integer read
LastErrorDesc (declared in TROSocket)
property LastErrorDesc: string read
Listen (declared in TROSocket)
Establishes a socket to listen for an incoming connection.
procedure Listen(aBacklog: Integer)
Parameters:
- aBacklog: Desired maximum length of the queue of pending connections. This value may be changed by the transport layer.
MaxLineLength
property MaxLineLength: Integer read write
Mode (declared in TROSocket)
property Mode: TROSocketMode read
NoDelay (declared in TROSocket)
Controls TCP packet batching (Nagle's algorithm).
TCP normally batches small logical packets into single larger physical packets (by briefly delaying packets) to fill physical network frames with as much data as possible. This is intended to improve network throughput in terminal emulation environments where mostly keystrokes are being sent across the network.
Setting NoDelay to true disables TCP packet batching.
Disabling TCP packet batching means that packets are sent regardless of size; this increases the volume of network traffic.
property NoDelay: Boolean read write
OnDisconnected
property OnDisconnected: TROSocketCallback read write
delegate: procedure OnDisconnected(Sender: TROAsyncSocket)
OnNewConnection
property OnNewConnection: TRONewConnection read write
delegate: procedure OnNewConnection(Sender: TObject; aSocket: TROAsyncSocket)
OnTimeout
property OnTimeout: TROSocketCallback read write
delegate: procedure OnTimeout(Sender: TROAsyncSocket)
OpenSSL (declared in TROSocket)
Specifies SSL properties
property OpenSSL: TROOpenSSL read
OpenSSL_Connect (declared in TROSocket)
procedure OpenSSL_Connect
PreferIP4 (declared in TROSocket)
property PreferIP4: Boolean read write
RaiseExcept (declared in TROSocket)
property RaiseExcept: Boolean read write
ReadLine
function ReadLine(var aLine: string): Boolean
Parameters:
- aLine:
ReceiverBufferSize
Controls the size of the receiving data buffer of the transport layer. Note that the transport layer may not provide the requested size, so you have to read ReceiverBufferSize to check the buffer size actually provided.
property ReceiverBufferSize: Integer read write
RecvBufferEx override
function RecvBufferEx(Buffer: Pointer; Len: Integer; aTimeout: Integer): Integer
Parameters:
- Buffer:
- Len:
- aTimeout:
ResetLastError (declared in TROSocket)
procedure ResetLastError
SendBuffer (declared in TROSocket)
function SendBuffer(Buffer: Pointer; Len: Integer): Boolean
Parameters:
- Buffer:
- Len:
SendBufferSize
Controls the size of the sending data buffer of the transport layer. Note that the transport layer may not provide the requested size, so you have to read SendBufferSize to check the buffer size actually provided.
property SendBufferSize: Integer read write
SockCheck (declared in TROSocket)
function SockCheck(SockResult: Integer): Integer
Parameters:
- SockResult:
Socket (declared in TROSocket)
property Socket: THandle read write
Active
property Active: Boolean read write
IdleTimeout
Determines the admissible interval in seconds between send or receive operations.
property IdleTimeout: Integer read write
LastError (declared in TROSocket)
property LastError: Integer read
LastErrorDesc (declared in TROSocket)
property LastErrorDesc: string read
MaxLineLength
property MaxLineLength: Integer read write
Mode (declared in TROSocket)
property Mode: TROSocketMode read
NoDelay (declared in TROSocket)
Controls TCP packet batching (Nagle's algorithm).
TCP normally batches small logical packets into single larger physical packets (by briefly delaying packets) to fill physical network frames with as much data as possible. This is intended to improve network throughput in terminal emulation environments where mostly keystrokes are being sent across the network.
Setting NoDelay to true disables TCP packet batching.
Disabling TCP packet batching means that packets are sent regardless of size; this increases the volume of network traffic.
property NoDelay: Boolean read write
OpenSSL (declared in TROSocket)
Specifies SSL properties
property OpenSSL: TROOpenSSL read
PreferIP4 (declared in TROSocket)
property PreferIP4: Boolean read write
RaiseExcept (declared in TROSocket)
property RaiseExcept: Boolean read write
ReceiverBufferSize
Controls the size of the receiving data buffer of the transport layer. Note that the transport layer may not provide the requested size, so you have to read ReceiverBufferSize to check the buffer size actually provided.
property ReceiverBufferSize: Integer read write
SendBufferSize
Controls the size of the sending data buffer of the transport layer. Note that the transport layer may not provide the requested size, so you have to read SendBufferSize to check the buffer size actually provided.
property SendBufferSize: Integer read write
Socket (declared in TROSocket)
property Socket: THandle read write
constructor Create (declared in TROSocket)
Creates a new instance.
constructor Create
constructor Create (TROSocketMode) overload
Creates a new instance with a supplied values.
constructor Create(aMode: TROSocketMode)
Parameters:
- aMode: Mode
constructor Create (TROSocketMode, THandle) overload
Creates a new instance with a supplied values.
constructor Create(aMode: TROSocketMode; aHandle: THandle)
Parameters:
- aMode:
- aHandle:
AbortSocket (declared in TROSocket)
procedure AbortSocket
Accept (declared in TROSocket)
function Accept: THandle
BeginDisconnect
procedure BeginDisconnect(aCallback: TROSocketCallback; aCallBack_name: string)
Parameters:
- aCallback:
- aCallBack_name:
BeginSend
procedure BeginSend(aData: Pointer; aStart: Integer; aLength: Integer; aCallback: TROSocketCallback; aCallBack_name: string)
Parameters:
- aData:
- aStart:
- aLength:
- aCallback:
- aCallBack_name:
Bind (declared in TROSocket)
procedure Bind(IP: string; Port: Word)
Parameters:
- IP:
- Port:
CanRead override
function CanRead(aTimeout: Integer): Boolean
Parameters:
- aTimeout:
CloseSocket (declared in TROSocket)
procedure CloseSocket
Connect (declared in TROSocket)
procedure Connect(IP: string; Port: Word)
Parameters:
- IP:
- Port:
CreateSocket (declared in TROSocket)
procedure CreateSocket
EndAccept
function EndAccept: TROAsyncSocket
EndDisconnect
Clean up a broken connection.
procedure EndDisconnect
EndSend
If the socket is not buffered (Buffered=False
), this method returns the result of calling the instrumental IntEndSend method.
Otherwise, it returns the amount of data recorded by the BufferedSendCallback and clears the callback registered by BeginSend.
function EndSend: Integer
ExceptCheck (declared in TROSocket)
procedure ExceptCheck(aRaiseExcept: Boolean; aAbortSocket: Boolean)
Parameters:
- aRaiseExcept:
- aAbortSocket:
GetErrorDescEx (declared in TROSocket)
function GetErrorDescEx: string
GetLocalIp
Retrieves the local endpoint of the transport layer.
function GetLocalIp: string
GetLocalPort
Retrieves the numeric value associated with the offered service by the transport layer.
function GetLocalPort: Integer
GetLocalSinIP (declared in TROSocket)
function GetLocalSinIP: string
GetRemoteIp
Retrieves the IP of the peer.
function GetRemoteIp: string
GetRemotePort
Gets the port of the peer used for communication.
function GetRemotePort: Integer
GetRemoteSinIP (declared in TROSocket)
function GetRemoteSinIP: string
GetSins (declared in TROSocket)
procedure GetSins
IsValidSocket (declared in TROSocket)
function IsValidSocket: Boolean
Listen (declared in TROSocket)
Establishes a socket to listen for an incoming connection.
procedure Listen(aBacklog: Integer)
Parameters:
- aBacklog: Desired maximum length of the queue of pending connections. This value may be changed by the transport layer.
OpenSSL_Connect (declared in TROSocket)
procedure OpenSSL_Connect
ReadLine
function ReadLine(var aLine: string): Boolean
Parameters:
- aLine:
RecvBufferEx override
function RecvBufferEx(Buffer: Pointer; Len: Integer; aTimeout: Integer): Integer
Parameters:
- Buffer:
- Len:
- aTimeout:
ResetLastError (declared in TROSocket)
procedure ResetLastError
SendBuffer (declared in TROSocket)
function SendBuffer(Buffer: Pointer; Len: Integer): Boolean
Parameters:
- Buffer:
- Len:
SockCheck (declared in TROSocket)
function SockCheck(SockResult: Integer): Integer
Parameters:
- SockResult:
OnDisconnected
property OnDisconnected: TROSocketCallback read write
delegate: procedure OnDisconnected(Sender: TROAsyncSocket)
OnNewConnection
property OnNewConnection: TRONewConnection read write
delegate: procedure OnNewConnection(Sender: TObject; aSocket: TROAsyncSocket)
OnTimeout
property OnTimeout: TROSocketCallback read write
delegate: procedure OnTimeout(Sender: TROAsyncSocket)