SendRT(Player client, byte cmd, object obj)

    public virtual void SendRT(Player client, byte cmd, object obj)
    {
        if (cmd < 30)
            throw new Exception("自定义协议(命令)不能使用内核协议(命令)进行发送!");
        using (MemoryStream stream = new MemoryStream(1024))
        {
            ProtoBuf.Serializer.Serialize(stream, obj);
            SendRT(client, cmd, stream.ToArray());
        }
    }

最后更新于

这有帮助吗?