Difference between revisions of "TTransportSocket"
From Ultibo.org
(Created page with " Return to Unit Transport __TOC__ === Description === ---- ''To be documented'' === Class definitions === ---- <div class="toccolours mw-collapsibl...") |
(No difference)
|
Revision as of 05:38, 30 May 2018
Return to Unit Transport
Description
To be documented
Class definitions
TTransportSocket = class(TListObject)
constructor Create(ATransport:TNetworkTransport);
|
|
destructor Destroy; override;
|
|
private
| |
FLock:TSynchronizerHandle;
|
|
FLocalLock:TMutexHandle;
|
|
procedure SetFamily(AFamily:Word);
|
|
procedure SetStruct(AStruct:Word);
|
|
procedure SetProto(AProto:Word);
|
|
procedure SetOwner(AOwner:TSocketList);
|
|
procedure SetSocketError(ASocketError:Integer);
|
|
procedure SetOpenTime(const AOpenTime:Int64);
|
|
procedure SetCloseTime(const ACloseTime:Int64);
|
|
procedure SetLingerTime(const ALingerTime:Int64);
|
|
procedure SetTimewaitTime(const ATimewaitTime:Int64);
|
|
procedure SetKeepAliveTime(const AKeepAliveTime:Int64);
|
|
protected
| |
FTransport:TNetworkTransport;
|
|
FFamily:Word;
|
AF_INET, AF_INET6, AF_IPX etc |
FStruct:Word;
|
SOCK_STREAM, SOCK_DGRAM etc |
FProto:Word;
|
IPPROTO_UDP, IPPROTO_TCP etc |
FOwner:TSocketList;
|
List that this Socket belongs to (eg AcceptQueue) |
FSocketError:Integer;
|
CONN_REFUSED etc |
FSocketState:TSocketState;
|
SS_UNCONNECTED, SS_ISCONNECTED etc |
FSocketOptions:TSocketOptions;
|
SO_ACCEPTCONN, SO_BROADCAST etc |
FOpenTime:Int64;
|
Socket was Opened ar [msec] (TCP_STATE_ESTAB) |
FCloseTime:Int64;
|
Socket was Closed at [msec] (TCP_STATE_CLOSED) |
FLingerTime:Int64;
|
Went into Linger at [msec] |
FTimewaitTime:Int64;
|
Went into Timewait at [msec] (TCP_STATE_TIMEWAIT) |
FKeepAliveTime:Int64;
|
Last KeepAlive Packet at [msec] |
FTransportState:TTransportState;
|
|
FTransportOptions:TTransportOptions;
|
|
function AcquireLock:Boolean;
|
|
function ReleaseLock:Boolean;
|
|
public
| |
property Family:Word read FFamily write SetFamily;
|
|
property Struct:Word read FStruct write SetStruct;
|
|
property Proto:Word read FProto write SetProto;
|
|
property Owner:TSocketList read FOwner write SetOwner;
|
|
property SocketError:Integer read FSocketError write SetSocketError;
|
|
property SocketState:TSocketState read FSocketState;
|
|
property SocketOptions:TSocketOptions read FSocketOptions;
|
|
property OpenTime:Int64 read FOpenTime write SetOpenTime;
|
|
property CloseTime:Int64 read FCloseTime write SetCloseTime;
|
|
property LingerTime:Int64 read FLingerTime write SetLingerTime;
|
|
property TimewaitTime:Int64 read FTimewaitTime write SetTimewaitTime;
|
|
property KeepAliveTime:Int64 read FKeepAliveTime write SetKeepAliveTime;
|
|
property TransportState:TTransportState read FTransportState;
|
|
property TransportOptions:TTransportOptions read FTransportOptions;
|
|
property Transport:TNetworkTransport read FTransport;
|
|
function GetOption(ALevel,AOptName:Integer; AOptValue:PChar; var AOptLength:Integer):Integer; virtual;
|
|
function SetOption(ALevel,AOptName:Integer; AOptValue:PChar; AOptLength:Integer):Integer; virtual;
|
|
function IoCtl(ACommand:DWORD; var AArgument:u_long):Integer; virtual;
|
|
function IsConnected(ALocalAddress,ARemoteAddress:Pointer; ALocalPort,ARemotePort:Word; ABroadcast:Boolean):Boolean; virtual;
|
|
function IsListening(ALocalAddress,ARemoteAddress:Pointer; ALocalPort,ARemotePort:Word; ABroadcast:Boolean):Boolean; virtual;
|
|
function ReaderLock:Boolean;
|
|
function ReaderUnlock:Boolean;
|
|
function ReaderConvert:Boolean;
|
|
function WriterLock:Boolean;
|
|
function WriterUnlock:Boolean;
|
|
function WriterConvert:Boolean;
|
Function declarations
constructor TTransportSocket.Create(ATransport:TNetworkTransport);
Description: To be documented
Note | None documented |
---|
destructor TTransportSocket.Destroy;
Description: To be documented
Note | None documented |
---|
procedure TTransportSocket.SetFamily(AFamily:Word);
Description: To be documented
Note | None documented |
---|
procedure TTransportSocket.SetStruct(AStruct:Word);
Description: To be documented
Note | None documented |
---|
procedure TTransportSocket.SetProto(AProto:Word);
Description: To be documented
Note | None documented |
---|
procedure TTransportSocket.SetOwner(AOwner:TSocketList);
Description: To be documented
Note | None documented |
---|
procedure TTransportSocket.SetSocketError(ASocketError:Integer);
Description: To be documented
Note | None documented |
---|
procedure TTransportSocket.SetOpenTime(const AOpenTime:Int64);
Description: To be documented
Note | None documented |
---|
procedure TTransportSocket.SetCloseTime(const ACloseTime:Int64);
Description: To be documented
Note | None documented |
---|
procedure TTransportSocket.SetLingerTime(const ALingerTime:Int64);
Description: To be documented
Note | None documented |
---|
procedure TTransportSocket.SetTimewaitTime(const ATimewaitTime:Int64);
Description: To be documented
Note | None documented |
---|
procedure TTransportSocket.SetKeepAliveTime(const AKeepAliveTime:Int64);
Description: To be documented
Note | None documented |
---|
function TTransportSocket.AcquireLock:Boolean;
Description: To be documented
Note | None documented |
---|
function TTransportSocket.ReleaseLock:Boolean;
Description: To be documented
Note | None documented |
---|
function TTransportSocket.GetOption(ALevel,AOptName:Integer; AOptValue:PChar; var AOptLength:Integer):Integer;
Description: To be documented
Note | With Socket Options that are Boolean 0 is False and > 0 is True |
---|
function TTransportSocket.SetOption(ALevel,AOptName:Integer; AOptValue:PChar; AOptLength:Integer):Integer;
Description: To be documented
Note | With Socket Options that are Boolean 0 is False and > 0 is True |
---|
function TTransportSocket.IoCtl(ACommand:DWORD; var AArgument:u_long):Integer;
Description: To be documented
Note | None documented |
---|
function TTransportSocket.IsConnected(ALocalAddress,ARemoteAddress:Pointer; ALocalPort,ARemotePort:Word; ABroadcast:Boolean):Boolean;
Description: To be documented
Note | None documented |
---|
function TTransportSocket.IsListening(ALocalAddress,ARemoteAddress:Pointer; ALocalPort,ARemotePort:Word; ABroadcast:Boolean):Boolean;
Description: To be documented
Note | None documented |
---|
function TTransportSocket.ReaderLock:Boolean;
Description: To be documented
Note | None documented |
---|
function TTransportSocket.ReaderUnlock:Boolean;
Description: To be documented
Note | None documented |
---|
function TTransportSocket.ReaderConvert:Boolean;
Description: Convert a Reader lock to a Writer lock
Note | None documented |
---|
function TTransportSocket.WriterLock:Boolean;
Description: To be documented
Note | None documented |
---|
function TTransportSocket.WriterUnlock:Boolean;
Description: To be documented
Note | None documented |
---|
function TTransportSocket.WriterConvert:Boolean;
Description: Convert a Writer lock to a Reader lock
Note | None documented |
---|
Return to Unit Reference