Network\Connection::__construct PHP 메소드

__construct() 공개 메소드

Constructs a new connection.
public __construct ( resource $socket ) : void
$socket resource Socket connection.
리턴 void
    public function __construct($socket)
    {
        $this->_socket = $socket;
    }

Usage Example

예제 #1
0
파일: client.php 프로젝트: prggmr/xpspl
 /**
  * Constructs a new client connection.
  *
  * @param  resource  $socket  Socket connection.
  *
  * @return  void
  */
 public function __construct($socket)
 {
     parent::__construct($socket);
     if (false === $this->_connect()) {
         throw_socket_error();
     }
 }