Description | Hierarchy | Fields | Methods | Properties |
type unaSocksThread = class(unaThread)
This thread is used to handle server or client connections.
constructor create(socks: unaSocks; id: tConID); |
|
destructor Destroy(); override; |
|
function getConnection(connId: tConID; timeout: tTimeout = 2000): unaSocksConnection; |
|
function getRemoteHostAddr(connId: tConID): pSockAddrIn; |
|
function checkSocketError(errorCode: integer; addr: pSockAddrIn = nil; allowThreadStop: bool = true): bool; |
|
function doGetRemoteHostAddr(connId: tConID): pSockAddrIn; virtual; |
|
function execute(globalIndex: unsigned): int; override; |
|
function getConnectionByAddr(const addr: sockaddr_in; needAcquire: bool): unaSocksConnection; |
|
function newConnId(initialValue_delta: int = -1): tConID; |
|
function sendDataTo(connId: tConID; data: pointer; len: uint; out asynch: bool; timeout: tTimeout = 500): int; virtual; |
|
procedure BeforeDestruction(); override; |
|
procedure releaseSocket(); |
property backLog: int read f_backLog; |
|
property connections: unaSocketsConnections read f_connections; |
|
property id: tConID read f_id; |
|
property initDone: unaEvent read f_initDone; |
|
property isServer: bool read f_isServer; |
|
property socketError: integer read f_socketError; |
|
property socks: unaSocks read f_socks; |
|
property threadSocket: unaSocket read f_socket; |
|
property udpConnectionTimeout: tTimeout read f_udpConnectionTimeout; |
constructor create(socks: unaSocks; id: tConID); |
|
destructor Destroy(); override; |
|
function getConnection(connId: tConID; timeout: tTimeout = 2000): unaSocksConnection; |
|
Returns sockets connection for specified connection id. |
function getRemoteHostAddr(connId: tConID): pSockAddrIn; |
|
function checkSocketError(errorCode: integer; addr: pSockAddrIn = nil; allowThreadStop: bool = true): bool; |
|
function doGetRemoteHostAddr(connId: tConID): pSockAddrIn; virtual; |
|
function execute(globalIndex: unsigned): int; override; |
|
function getConnectionByAddr(const addr: sockaddr_in; needAcquire: bool): unaSocksConnection; |
|
function newConnId(initialValue_delta: int = -1): tConID; |
|
function sendDataTo(connId: tConID; data: pointer; len: uint; out asynch: bool; timeout: tTimeout = 500): int; virtual; |
|
procedure BeforeDestruction(); override; |
|
procedure releaseSocket(); |
|
property backLog: int read f_backLog; |
|
property connections: unaSocketsConnections read f_connections; |
|
property id: tConID read f_id; |
|
property initDone: unaEvent read f_initDone; |
|
property isServer: bool read f_isServer; |
|
property socketError: integer read f_socketError; |
|
property socks: unaSocks read f_socks; |
|
property threadSocket: unaSocket read f_socket; |
|
property udpConnectionTimeout: tTimeout read f_udpConnectionTimeout; |
|
(c) 2012 Lake of Soft