TROSocket

Overview

Represents a socket

Location


 

constructor Create

Creates a new instance.

constructor Create

AbortSocket

procedure AbortSocket

Bind

Associates a socket with ip and port

procedure Bind(IP: string; Port: Word)

Parameters:

  • IP: IP address to assign to this socket
  • Port: Numeric value of the offered service

CanRead  virtual

function CanRead(aTimeout: Integer): Boolean

Parameters:

  • aTimeout:

CloseSocket

procedure CloseSocket

Connect

procedure Connect(IP: string; Port: Word)

Parameters:

  • IP:
  • Port:

CreateOpenSSL  protected virtual

Creates OpenSSL properties

procedure CreateOpenSSL

CreateSocket

procedure CreateSocket

ExceptCheck

procedure ExceptCheck(aRaiseExcept: Boolean; aAbortSocket: Boolean)

Parameters:

  • aRaiseExcept:
  • aAbortSocket:

GetErrorDescEx

function GetErrorDescEx: string

GetLocalSinIP

function GetLocalSinIP: string

GetRemoteSinIP

function GetRemoteSinIP: string

GetSins

procedure GetSins

IsValidSocket

function IsValidSocket: Boolean

LastError

property LastError: Integer read

LastErrorDesc

property LastErrorDesc: string read

Mode

property Mode: TROSocketMode read

NoDelay

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

Specifies SSL properties

property OpenSSL: TROOpenSSL read

OpenSSL_Connect

procedure OpenSSL_Connect

PreferIP4

property PreferIP4: Boolean read write default True

RaiseExcept

property RaiseExcept: Boolean read write default True

RecvBufferEx  virtual

function RecvBufferEx(Buffer: Pointer; Len: Integer; aTimeout: Integer = 0): Integer

Parameters:

  • Buffer:
  • Len:
  • aTimeout:

ResetLastError

procedure ResetLastError

SendBuffer

Sends data to a connected Socket object.

function SendBuffer(Buffer: Pointer; Len: Integer): Boolean

Parameters:

  • Buffer:
  • Len:

SockCheck

function SockCheck(SockResult: Integer = Integer(SOCKET_ERROR)): Integer

Parameters:

  • SockResult:

Socket

property Socket: THandle read write

 

LastError

property LastError: Integer read

LastErrorDesc

property LastErrorDesc: string read

Mode

property Mode: TROSocketMode read

NoDelay

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

Specifies SSL properties

property OpenSSL: TROOpenSSL read

PreferIP4

property PreferIP4: Boolean read write default True

RaiseExcept

property RaiseExcept: Boolean read write default True

Socket

property Socket: THandle read write

 

constructor Create

Creates a new instance.

constructor Create

AbortSocket

procedure AbortSocket

Bind

Associates a socket with ip and port

procedure Bind(IP: string; Port: Word)

Parameters:

  • IP: IP address to assign to this socket
  • Port: Numeric value of the offered service

CanRead  virtual

function CanRead(aTimeout: Integer): Boolean

Parameters:

  • aTimeout:

CloseSocket

procedure CloseSocket

Connect

procedure Connect(IP: string; Port: Word)

Parameters:

  • IP:
  • Port:

CreateOpenSSL  protected virtual

Creates OpenSSL properties

procedure CreateOpenSSL

CreateSocket

procedure CreateSocket

ExceptCheck

procedure ExceptCheck(aRaiseExcept: Boolean; aAbortSocket: Boolean)

Parameters:

  • aRaiseExcept:
  • aAbortSocket:

GetErrorDescEx

function GetErrorDescEx: string

GetLocalSinIP

function GetLocalSinIP: string

GetRemoteSinIP

function GetRemoteSinIP: string

GetSins

procedure GetSins

IsValidSocket

function IsValidSocket: Boolean

OpenSSL_Connect

procedure OpenSSL_Connect

RecvBufferEx  virtual

function RecvBufferEx(Buffer: Pointer; Len: Integer; aTimeout: Integer = 0): Integer

Parameters:

  • Buffer:
  • Len:
  • aTimeout:

ResetLastError

procedure ResetLastError

SendBuffer

Sends data to a connected Socket object.

function SendBuffer(Buffer: Pointer; Len: Integer): Boolean

Parameters:

  • Buffer:
  • Len:

SockCheck

function SockCheck(SockResult: Integer = Integer(SOCKET_ERROR)): Integer

Parameters:

  • SockResult: