Example #1
0
    //Protobuffer从MemoryStream进行反序列化
    public bool FromMemoryStream(MemoryStream protoMS)
    {
        LoginRpcConnectReply pb = ProtoBuf.Serializer.Deserialize <LoginRpcConnectReply>(protoMS);

        FromPB(pb);
        return(true);
    }
Example #2
0
    //转化成Protobuffer类型函数
    public LoginRpcConnectReply ToPB()
    {
        LoginRpcConnectReply v = new LoginRpcConnectReply();

        v.Result = m_Result;
        v.Type   = m_Type;

        return(v);
    }
Example #3
0
 //从Protobuffer类型初始化
 public void FromPB(LoginRpcConnectReply v)
 {
     if (v == null)
     {
         return;
     }
     m_Result = v.Result;
     m_Type   = v.Type;
 }