Пример #1
0
        public void ProcessCall(RPCData.Call call)
        {
            var processCall = processors[call.MethodId].Call;

            if (processCall != null)
            {
                processCall(call);
            }
            else
            {
                SerializerUtil.Skip(call.Data.Serializer, TType.DataObject);
                var          response = RPCData.Create(call.Data, RPCDataType.Exception);
                RPCException x        = new RPCException(RPCException.ExceptionType.UnknownMethod, "Invalid method id: '" + call.MethodId + "'");
                response.Serializer.WriteI32(call.Id);
                x.Write(response.Serializer);
                response.Dispatch();
            }
        }
Пример #2
0
 public Task <RPCData> DispatchCall(RPCData.Call call)
 {
     return(callProcessor.DispatchCall(call.Id, call.Data));
 }