Hoa central
Node.php
Go to the documentation of this file.
1 <?php
2 
37 namespace Hoa\Socket;
38 
47 class Node
48 {
54  protected $_id = null;
55 
61  private $_socket = null;
62 
68  private $_connection = null;
69 
75  protected $_encryptionType = null;
76 
77 
78 
87  public function __construct($id, $socket, Connection $connection)
88  {
89  $this->_id = $id;
90  $this->_socket = $socket;
91  $this->_connection = $connection;
92 
93  return;
94  }
95 
101  public function getId()
102  {
103  return $this->_id;
104  }
105 
111  public function getSocket()
112  {
113  return $this->_socket;
114  }
115 
121  public function getConnection()
122  {
123  return $this->_connection;
124  }
125 
134  public function setEncryptionType($type)
135  {
136  $old = $this->_encryptionType;
137  $this->_encryptionType = $type;
138 
139  return $old;
140  }
141 
147  public function getEncryptionType()
148  {
149  return $this->_encryptionType;
150  }
151 }
setEncryptionType($type)
Definition: Node.php:134
getEncryptionType()
Definition: Node.php:147
__construct($id, $socket, Connection $connection)
Definition: Node.php:87