Home Units Hierarchy Routines All identifiers

Class unaSocksConnection

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type unaSocksConnection = class(unaObject)

Description

This is base class for connection between two sockets.

Hierarchy

Overview

Methods

Public constructor create(thread: unaSocksThread; connId: tConID; socket: unaSocket; addr: pSockAddrIn = nil; len: int = 0);
Public function compareAddr(const addr: sockaddr_in): bool;
Public function okToWrite(timeout: tTimeout = 100; noCheckState: bool = false): bool;
Public function send(data: pointer; size: uint; noCheck: bool = false): uint;
Protected function acquire(timeout: tTimeout): bool;
Protected function getTimeout(): tTimeout;
Public procedure BeforeDestruction(); override;
Public procedure release();
Protected procedure resetTimeout();

Properties

Public property connId: tConID read f_connId;
Protected property destroying: bool read f_destroying;
Public property paddr: pSockAddrIn read getAddr;
Public property socket: unaSocket read f_threadSocket;
Protected property threadSocket: unaSocket read f_threadSocket;

Description

Methods

Public constructor create(thread: unaSocksThread; connId: tConID; socket: unaSocket; addr: pSockAddrIn = nil; len: int = 0);
 
Public function compareAddr(const addr: sockaddr_in): bool;

Compares given address with address of local socket.

Returns

true if given address belongs to local socket.

Public function okToWrite(timeout: tTimeout = 100; noCheckState: bool = false): bool;
 
Returns

True if there are some chances data could be sent right now..

Public function send(data: pointer; size: uint; noCheck: bool = false): uint;

Sends data to remote socket.

Returns

0 if data was sent successfully, or specific WSA error otherwise.

Protected function acquire(timeout: tTimeout): bool;
 
Protected function getTimeout(): tTimeout;
 
Public procedure BeforeDestruction(); override;
 
Public procedure release();
 
Protected procedure resetTimeout();
 

Properties

Public property connId: tConID read f_connId;

id of this connection.

Protected property destroying: bool read f_destroying;
 
Public property paddr: pSockAddrIn read getAddr;

@Return pointer to sockaddr_in structure filled by local socket.

Public property socket: unaSocket read f_threadSocket;

@Return local socket class instance.

Protected property threadSocket: unaSocket read f_threadSocket;
 

(c) 2012 Lake of Soft


Generated by PasDoc 0.12.1 on 2012-10-09