示例#1
0
 public RemoteConnection(IConnection underlyingConnection, IHeliosConnectionHandler handler) : base(underlyingConnection)
 {
     _msgDecoder      = new MsgDecoder();
     _msgEncoder      = new MsgEncoder();
     _protobufDecoder = new ProtobufDecoder(TCP.Wrapper.DefaultInstance);
     _handler         = handler;
 }
示例#2
0
    void Awake()
    {
        ExtensionRegistry registry = ExtensionRegistry.CreateInstance();

        registry.Add(ProtobufMsgEnterGame.MsgEnterGame);
        registry.Add(ProtobufMsgLogin.MsgLogin);
        registry.Add(MsgBuyItem.msgBuyItem);
        _decoder = new ProtobufDecoder(ServerMessage.DefaultInstance, registry);
    }