help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Classes] Reference for unit 'lNet' (#LNet)

TLConnection

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Basic TCP and UDP abstraction class

Declaration

Source position: lnet.pp line 238

type TLConnection = class(TLComponent)

protected

  FTimeVal: TTimeVal;

  FOnReceive: TLSocketEvent;

  FOnAccept: TLSocketEvent;

  FOnConnect: TLSocketEvent;

  FOnDisconnect: TLSocketEvent;

  FOnCanSend: TLSocketEvent;

  FOnError: TLSocketErrorEvent;

  FRootSock: TLSocket;

  FIterator: TLSocket;

  FID: Integer;

  FEventer: TLEventer;

  FEventerClass: TLEventerClass;

  FTimeout: Integer;

  FListenBacklog: Integer;

  function InitSocket(); virtual;

  function GetConnected; virtual; abstract;

  function GetCount; virtual;

  function GetItem();

  function GetTimeout;

  procedure SetTimeout();

  procedure SetEventer();

  procedure ConnectAction(); virtual;

  procedure AcceptAction(); virtual;

  procedure ReceiveAction(); virtual;

  procedure SendAction(); virtual;

  procedure ErrorAction(); virtual;

  procedure ConnectEvent(); virtual;

  procedure DisconnectEvent(); virtual;

  procedure AcceptEvent(); virtual;

  procedure ReceiveEvent(); virtual;

  procedure CanSendEvent(); virtual;

  procedure ErrorEvent(); virtual;

  procedure EventerError();

  procedure RegisterWithEventer; virtual;

  procedure FreeSocks; virtual;

public

  constructor Create(); override;

  

Standard constructor

  destructor Destroy; override;

  

Standard destructor

  function Connect();

  

Connects the connection to the remote host

  function Listen();

  

Listens for new connections

  function Get(); virtual; abstract;

  

Receives data from the other side

  function GetMessage(); virtual; abstract;

  

Receives message from the other side

  function Send(); virtual; abstract;

  

Send data to the other side

  function SendMessage(); virtual; abstract;

  

Send a string message to the other side

  function IterNext; virtual; abstract;

  

Iterator for cycling all sockets in a connection

  procedure IterReset; virtual; abstract;

  

Reset the iterator

  property OnError: TLSocketErrorEvent; [rw]

  

Error event callback

  property OnReceive: TLSocketEvent; [rw]

  

Receive event callback

  property OnDisconnect: TLSocketEvent; [rw]

  

Disconnect event callback

  property OnCanSend: TLSocketEvent; [rw]

  

Send possibility event callback

  property Socks: TLSocket; default; [r]

  

The array property of sockets on connection

  property Count: Integer; [r]

  

Count of sockets in connection

  property Connected: Boolean; [r]

  

Specifies connected status

  property ListenBacklog: Integer; [rw]

  

Specifies the size of listen backlog

  property Iterator: TLSocket; [r]

  

The socket iterator property

  property Timeout: Integer; [rw]

  

Specifies the timeout on CallAction

  property Eventer: TLEventer; [rw]

  

Specifies the eventer for connection

  property EventerClass: TLEventerClass; [rw]

  

Specify the eventer class to use

end;

Inheritance

TLConnection

  

Basic TCP and UDP abstraction class

|

TLComponent

  

Basic abstraction of network connections.

|

TComponent

?

TObject

Description

This class is used as a common ancestor to both TCP and UDP connection protocols. It has all the common methods and properties of both those connections.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505