Hoa central
Public Member Functions | Protected Attributes | Private Attributes | List of all members
Hoa\Socket\Node Class Reference
Inheritance diagram for Hoa\Socket\Node:

Public Member Functions

 __construct ($id, $socket, Connection $connection)
 
 getId ()
 
 getSocket ()
 
 getConnection ()
 
 setEncryptionType ($type)
 
 getEncryptionType ()
 

Protected Attributes

 $_id = null
 
 $_encryptionType = null
 

Private Attributes

 $_socket = null
 
 $_connection = null
 

Detailed Description

Class .

Represent a generic node.

Definition at line 47 of file Node.php.

Constructor & Destructor Documentation

Hoa\Socket\Node::__construct (   $id,
  $socket,
Connection  $connection 
)

Constructor.

Parameters
string$idID.
resource$socketSocket.
\Hoa\Socket\Connection$connectionConnection.
Returns
void

Definition at line 87 of file Node.php.

88  {
89  $this->_id = $id;
90  $this->_socket = $socket;
91  $this->_connection = $connection;
92 
93  return;
94  }

Member Function Documentation

Hoa\Socket\Node::getConnection ( )

Get connection.

Returns

Definition at line 121 of file Node.php.

122  {
123  return $this->_connection;
124  }
Hoa\Socket\Node::getEncryptionType ( )

Get encryption type.

Returns
int

Definition at line 147 of file Node.php.

148  {
149  return $this->_encryptionType;
150  }
Hoa\Socket\Node::getId ( )

Get node's ID.

Returns
string

Definition at line 101 of file Node.php.

102  {
103  return $this->_id;
104  }
Hoa\Socket\Node::getSocket ( )

Get node's socket resource.

Returns
resource

Definition at line 111 of file Node.php.

112  {
113  return $this->_socket;
114  }
Hoa\Socket\Node::setEncryptionType (   $type)

Set encryption type.

Parameters
int$typeType of encryption (please, see ENCRYPTION_* constants from Hoa and Hoa).
Returns
int

Definition at line 134 of file Node.php.

135  {
136  $old = $this->_encryptionType;
137  $this->_encryptionType = $type;
138 
139  return $old;
140  }

Member Data Documentation

Hoa\Socket\Node::$_connection = null
private

Definition at line 68 of file Node.php.

Hoa\Socket\Node::$_encryptionType = null
protected

Definition at line 75 of file Node.php.

Hoa\Socket\Node::$_id = null
protected

Definition at line 54 of file Node.php.

Hoa\Socket\Node::$_socket = null
private

Definition at line 61 of file Node.php.


The documentation for this class was generated from the following file: