Home Units Hierarchy Routines All identifiers

Class unaSocksThread

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type unaSocksThread = class(unaThread)

Description

This thread is used to handle server or client connections.

Hierarchy

Overview

Methods

Public constructor create(socks: unaSocks; id: tConID);
Public destructor Destroy(); override;
Public function getConnection(connId: tConID; timeout: tTimeout = 2000): unaSocksConnection;
Public function getRemoteHostAddr(connId: tConID): pSockAddrIn;
Protected function checkSocketError(errorCode: integer; addr: pSockAddrIn = nil; allowThreadStop: bool = true): bool;
Protected function doGetRemoteHostAddr(connId: tConID): pSockAddrIn; virtual;
Protected function execute(globalIndex: unsigned): int; override;
Protected function getConnectionByAddr(const addr: sockaddr_in; needAcquire: bool): unaSocksConnection;
Protected function newConnId(initialValue_delta: int = -1): tConID;
Protected function sendDataTo(connId: tConID; data: pointer; len: uint; out asynch: bool; timeout: tTimeout = 500): int; virtual;
Public procedure BeforeDestruction(); override;
Protected procedure releaseSocket();

Properties

Public property backLog: int read f_backLog;
Public property connections: unaSocketsConnections read f_connections;
Public property id: tConID read f_id;
Public property initDone: unaEvent read f_initDone;
Public property isServer: bool read f_isServer;
Public property socketError: integer read f_socketError;
Public property socks: unaSocks read f_socks;
Public property threadSocket: unaSocket read f_socket;
Public property udpConnectionTimeout: tTimeout read f_udpConnectionTimeout;

Description

Methods

Public constructor create(socks: unaSocks; id: tConID);
 
Public destructor Destroy(); override;
 
Public function getConnection(connId: tConID; timeout: tTimeout = 2000): unaSocksConnection;

Returns sockets connection for specified connection id.

Public function getRemoteHostAddr(connId: tConID): pSockAddrIn;
 
Protected function checkSocketError(errorCode: integer; addr: pSockAddrIn = nil; allowThreadStop: bool = true): bool;
 
Protected function doGetRemoteHostAddr(connId: tConID): pSockAddrIn; virtual;
 
Protected function execute(globalIndex: unsigned): int; override;
 
Protected function getConnectionByAddr(const addr: sockaddr_in; needAcquire: bool): unaSocksConnection;
 
Protected function newConnId(initialValue_delta: int = -1): tConID;
 
Protected function sendDataTo(connId: tConID; data: pointer; len: uint; out asynch: bool; timeout: tTimeout = 500): int; virtual;
 
Public procedure BeforeDestruction(); override;
 
Protected procedure releaseSocket();
 

Properties

Public property backLog: int read f_backLog;
 
Public property connections: unaSocketsConnections read f_connections;
 
Public property id: tConID read f_id;
 
Public property initDone: unaEvent read f_initDone;
 
Public property isServer: bool read f_isServer;
 
Public property socketError: integer read f_socketError;
 
Public property socks: unaSocks read f_socks;
 
Public property threadSocket: unaSocket read f_socket;
 
Public property udpConnectionTimeout: tTimeout read f_udpConnectionTimeout;
 

(c) 2012 Lake of Soft


Generated by PasDoc 0.12.1 on 2012-10-09