_id = $id; $this->_socket = $socket; $this->_connection = $connection; return; } /** * Get node's ID. * * @return string */ public function getId() { return $this->_id; } /** * Get node's socket resource. * * @return resource */ public function getSocket() { return $this->_socket; } /** * Get connection. * * @return \Hoa\Socket\Connection */ public function getConnection() { return $this->_connection; } /** * Set encryption type. * * @param int $type Type of encryption (please, see ENCRYPTION_* * constants from Hoa\Socket\Client and * Hoa\Socket\Server). * @return int */ public function setEncryptionType($type) { $old = $this->_encryptionType; $this->_encryptionType = $type; return $old; } /** * Get encryption type. * * @return int */ public function getEncryptionType() { return $this->_encryptionType; } }