[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
Source position: flcTCPConnection.pas line 239
type TTCPConnection = class
protected
FSocket: TSysSocket;
FTrackLastActivityTime: Boolean;
FUseWorkerThread: Boolean;
FUserTag: NativeInt;
FUserObject: TObject;
FOnLog: TTCPConnectionLogEvent;
FOnStateChange: TTCPConnectionStateChangeEvent;
FOnReady: TTCPConnectionNotifyEvent;
FOnClose: TTCPConnectionNotifyEvent;
FOnReadShutdown: TTCPConnectionNotifyEvent;
FOnShutdown: TTCPConnectionNotifyEvent;
FOnRead: TTCPConnectionNotifyEvent;
FOnWrite: TTCPConnectionNotifyEvent;
FOnReadActivity: TTCPConnectionNotifyEvent;
FOnReadBufferFull: TTCPConnectionNotifyEvent;
FOnWriteBufferEmpty: TTCPConnectionNotifyEvent;
FOnWait: TTCPConnectionNotifyEvent;
FOnWorkerExecute: TTCPConnectionWorkerExecuteEvent;
FOnWorkerFinished: TTCPConnectionNotifyEvent;
FLock: TCriticalSection;
FState: TTCPConnectionState;
FErrorMessage: string;
FCreationTime: TDateTime;
FReadBuffer: TTCPBuffer;
FWriteBuffer: TTCPBuffer;
FReadTransferState: TTCPConnectionTransferState;
FWriteTransferState: TTCPConnectionTransferState;
FProxyList: TTCPConnectionProxyList;
FProxyConnection: Boolean;
FReadyNotified: Boolean;
FReadEventPending: Boolean;
FReadBufferFull: Boolean;
FReadProcessPending: Boolean;
FReadActivityPending: Boolean;
FWriteEventPending: Boolean;
FShutdownSendPending: Boolean;
FShutdownSent: Boolean;
FShutdownRecv: Boolean;
FShutdownComplete: Boolean;
FClosePending: Boolean;
FLastReadActivityTime: TDateTime;
FBlockingConnection: TTCPBlockingConnection;
FWorkerThread: TThread;
FWorkerErrorMsg: string;
FWorkerErrorClass: string;
procedure Init; virtual;
procedure InitBuffers();
procedure Lock;
procedure Unlock;
procedure Log();
function GetState;
function GetStateStr;
procedure SetStateProxyNegotiation;
procedure SetStateFailed;
procedure SetStateConnected;
function SetStateClosed;
function GetReadBufferMinSize;
function GetReadBufferMaxSize;
function GetWriteBufferMinSize;
function GetWriteBufferMaxSize;
procedure SetReadBufferMinSize();
procedure SetReadBufferMaxSize();
procedure SetWriteBufferMinSize();
procedure SetWriteBufferMaxSize();
function GetSocketReadBufferSize;
function GetSocketWriteBufferSize;
procedure SetSocketReadBufferSize();
procedure SetSocketWriteBufferSize();
function GetReadBufferUsed;
function GetWriteBufferUsed;
function GetReadBufferAvailable;
function GetWriteBufferAvailable;
function GetReadRate;
function GetWriteRate;
procedure TriggerStateChange;
procedure TriggerReady;
procedure TriggerReadShutdown;
procedure TriggerShutdown;
procedure TriggerClose;
procedure TriggerRead;
procedure TriggerWrite;
procedure TriggerReadActivity;
procedure TriggerReadBufferFull;
procedure TriggerWriteBufferEmpty;
procedure TriggerWait;
procedure TriggerWorkerFinished;
function GetFirstActiveProxy;
procedure ProxyProcessReadData();
procedure ProxyProcessWriteData();
procedure ProxyLog();
procedure ProxyConnectionClose();
procedure ProxyStateChange();
procedure ProxyConnectionPutReadData();
procedure ProxyConnectionPutWriteData();
procedure StartProxies();
function FillBufferFromSocket();
function WriteBufferToSocket();
function GetLastReadActivityTime;
function LocateByteCharInBuffer();
function LocateByteStrInBuffer();
function WriteToTransport();
procedure DoShutdown();
procedure Wait;
function GetBlockingConnection;
procedure StartWorkerThread;
procedure WorkerThreadExecute();
public
constructor Create();
destructor Destroy; override;
procedure Finalise;
property OnLog: TTCPConnectionLogEvent; [rw]
property OnStateChange: TTCPConnectionStateChangeEvent; [rw]
property OnReady: TTCPConnectionNotifyEvent; [rw]
property OnReadShutdown: TTCPConnectionNotifyEvent; [rw]
property OnShutdown: TTCPConnectionNotifyEvent; [rw]
property OnClose: TTCPConnectionNotifyEvent; [rw]
property OnRead: TTCPConnectionNotifyEvent; [rw]
property OnWrite: TTCPConnectionNotifyEvent; [rw]
property OnReadBufferFull: TTCPConnectionNotifyEvent; [rw]
property OnWriteBufferEmpty: TTCPConnectionNotifyEvent; [rw]
property OnReadActivity: TTCPConnectionNotifyEvent; [rw]
property Socket: TSysSocket; [r]
property ReadBufferMinSize: Int32; [rw]
property ReadBufferMaxSize: Int32; [rw]
property WriteBufferMinSize: Int32; [rw]
property WriteBufferMaxSize: Int32; [rw]
property SocketReadBufferSize: Integer; [rw]
property SocketWriteBufferSize: Integer; [rw]
procedure AddProxy();
property State: TTCPConnectionState; [r]
property StateStr: string; [r]
property ErrorMessage: string; [r]
property CreationTime: TDateTime; [r]
procedure Start;
property ReadRate: Integer; [r]
property WriteRate: Integer; [r]
function ProcessPendingEvents;
procedure GetEventsToPoll();
procedure ProcessSocket();
property TrackLastActivityTime: Boolean; [rw]
property LastReadActivityTime: TDateTime; [r]
property ReadBufferUsed: Integer; [r]
property WriteBufferUsed: Integer; [r]
property ReadBufferAvailable: Integer; [r]
property WriteBufferAvailable: Integer; [r]
function Read();
function ReadByteString();
function ReadBytes();
function Discard();
function Peek();
function PeekByte();
function PeekByteString();
function PeekBytes();
function PeekDelimited();
function ReadLine();
function Write();
function WriteByteString();
function WriteBytes();
procedure Shutdown;
function IsShutdownComplete;
procedure Close;
property UseWorkerThread: Boolean; [rw]
property OnWorkerExecute: TTCPConnectionWorkerExecuteEvent; [rw]
property WorkerErrorClass: string; [r]
property WorkerErrorMsg: string; [r]
procedure TerminateWorkerThread;
procedure WaitForWorkerThread;
property BlockingConnection: TTCPBlockingConnection; [r]
property OnWait: TTCPConnectionNotifyEvent; [rw]
property UserTag: NativeInt; [rw]
property UserObject: TObject; [rw]
end;
TTCPConnection
TObject