//--------------------------------------------------------------------- // 客户端请求 Task IGrainClientProxy.Notify(MethodInfo method_info) { if (Observer != null) { Observer.NotifyClient(method_info); } return TaskDone.Done; }
//--------------------------------------------------------------------- // 客户端请求 Task IGrainClientProxy.Request(MethodInfo method_info) { IMMethodType method_type = (IMMethodType)method_info.id; if (method_type == IMMethodType.PlayerRequest) { var player_request = EbTool.protobufDeserialize<PlayerRequest>(MemoryStream, method_info.data); return _c2sPlayerRequest(player_request); } else if (method_type == IMMethodType.AccountRequest) { var account_request = EbTool.protobufDeserialize<AccountRequest>(MemoryStream, method_info.data); return _c2sAccountRequest(account_request); } return TaskDone.Done; }
//--------------------------------------------------------------------- void IGrainClientObserver.NotifyClient(MethodInfo method_info) { this.sessionListener.Orleans2Unity(method_info.id, method_info.data); }