Description | Hierarchy | Fields | Methods | Properties |
type unaSocksConnection = class(unaObject)
This is base class for connection between two sockets.
constructor create(thread: unaSocksThread; connId: tConID; socket: unaSocket; addr: pSockAddrIn = nil; len: int = 0); |
|
function compareAddr(const addr: sockaddr_in): bool; |
|
function okToWrite(timeout: tTimeout = 100; noCheckState: bool = false): bool; |
|
function send(data: pointer; size: uint; noCheck: bool = false): uint; |
|
function acquire(timeout: tTimeout): bool; |
|
function getTimeout(): tTimeout; |
|
procedure BeforeDestruction(); override; |
|
procedure release(); |
|
procedure resetTimeout(); |
property connId: tConID read f_connId; |
|
property destroying: bool read f_destroying; |
|
property paddr: pSockAddrIn read getAddr; |
|
property socket: unaSocket read f_threadSocket; |
|
property threadSocket: unaSocket read f_threadSocket; |
constructor create(thread: unaSocksThread; connId: tConID; socket: unaSocket; addr: pSockAddrIn = nil; len: int = 0); |
|
function compareAddr(const addr: sockaddr_in): bool; |
|
Compares given address with address of local socket. Returnstrue if given address belongs to local socket. |
function okToWrite(timeout: tTimeout = 100; noCheckState: bool = false): bool; |
|
Returns
|
function send(data: pointer; size: uint; noCheck: bool = false): uint; |
|
Sends data to remote socket. Returns0 if data was sent successfully, or specific WSA error otherwise. |
function acquire(timeout: tTimeout): bool; |
|
function getTimeout(): tTimeout; |
|
procedure BeforeDestruction(); override; |
|
procedure release(); |
|
procedure resetTimeout(); |
|
property connId: tConID read f_connId; |
|
id of this connection. |
property destroying: bool read f_destroying; |
|
property paddr: pSockAddrIn read getAddr; |
|
@Return pointer to sockaddr_in structure filled by local socket. |
property socket: unaSocket read f_threadSocket; |
|
@Return local socket class instance. |
property threadSocket: unaSocket read f_threadSocket; |
|
(c) 2012 Lake of Soft