MyQEE\Server\RPC::closeClient PHP Method

closeClient() protected method

关闭当前RPC客户端连接
protected closeClient ( $msg = null )
    protected function closeClient($msg = null)
    {
        $data = ['type' => 'close', 'msg' => $msg, 'code' => 0];
        $this->__isClosed = true;
        Server::$server->send($this->__fd, json_encode($data, JSON_UNESCAPED_UNICODE) . RPC\Server::$EOF, $this->__fromId);
        Server::$server->close($this->__fd, $this->__fromId);
        $this->disableReuse();
    }