예제 #1
0
 public function __construct($address = null)
 {
     parent::__construct();
     if ($address) {
         $this->open($address);
     }
 }
예제 #2
0
파일: Tcp.php 프로젝트: a13k5and3r/Stream
 public function __construct($address = null)
 {
     parent::__construct();
     // $this->setBlocking(false);
     if (is_null($address)) {
         return;
     }
     if (is_resource($address)) {
         $this->open($address);
     } else {
         // TODO: open socket by address
     }
 }
예제 #3
0
 public function __construct($resource = null)
 {
     parent::__construct($resource);
     $this->on("rawdata", [$this, "onRawData"]);
 }