コード例 #1
0
ファイル: Gateway.php プロジェクト: shitfSign/workerman-MT
 /**
  * 内部通讯socket在BusinessWorker主动关闭连接时触发
  * @param int $fd
  */
 protected function closeInnerClient($fd)
 {
     unset($this->workerConnections[$fd]);
     parent::closeClient($fd);
 }
コード例 #2
0
 /**
  * 关闭连接
  * @see Man\Core.SocketWorker::closeClient()
  */
 protected function closeClient($fd = null)
 {
     // 清理$this->gatewayConnections对应项
     foreach ($this->gatewayConnections as $addr => $con) {
         $the_fd = (int) $con;
         if ($the_fd == $fd) {
             unset($this->gatewayConnections[$addr], $this->badGatewayAddress[$addr]);
         }
     }
     parent::closeClient($fd);
 }
コード例 #3
0
 protected function closeClient($fd)
 {
     if ($uid = $this->getUidByFd($fd)) {
         $this->sendToWorker(GatewayProtocol::CMD_ON_CLOSE, $fd);
         unset($this->uidConnMap[$uid], $this->connUidMap[$fd]);
     }
     parent::closeClient($fd);
 }