Exemplo n.º 1
0
 public function __construct($client_class, $bind_address = 0, $bind_port = 0, $domain = AF_INET, $type = SOCK_STREAM, $protocol = SOL_TCP)
 {
     AirD::Log(AirD::LOGTYPE_INTERNAL, "socketServer's constructor", true);
     parent::__construct($bind_address, $bind_port, $domain, $type, $protocol);
     $this->client_class = $client_class;
     $this->listen();
 }
Exemplo n.º 2
0
 public function __construct($sServer, $iPort)
 {
     AirD::Log(AirD::LOGTYPE_INTERNAL, "socketClient's constructor", true);
     parent::__construct(Config::BIND_ADDRESS);
     $this->connect($sServer, $iPort);
     $this->set_non_block(true);
     SocketEngine::AddFd($this);
 }