public void Read(TProtocol iprot) { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.Struct) { PlayerUnreadCount = new PlayerUnreadCount(); PlayerUnreadCount.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }
public void send_NewMessage(PlayerUnreadCount playerUnreadCount) { oprot_.WriteMessageBegin(new TMessage("NewMessage", TMessageType.Call, seqid_)); NewMessage_args args = new NewMessage_args(); args.PlayerUnreadCount = playerUnreadCount; args.Write(oprot_); oprot_.WriteMessageEnd(); oprot_.Transport.Flush(); }
public void NewMessage(PlayerUnreadCount playerUnreadCount) { IPlayer player; locker.Lock((uint)playerUnreadCount.Id, out player).Do(() => { if (player.Session == null) { return; } try { protocolFactory.CreateProtocol(player.Session).MessageSendUnreadCount(playerUnreadCount.UnreadCount); } catch { } }); }
public void Read(TProtocol iprot) { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.List) { { PlayerUnreadCount = new List <PlayerUnreadCount>(); TList _list0 = iprot.ReadListBegin(); for (int _i1 = 0; _i1 < _list0.Count; ++_i1) { PlayerUnreadCount _elem2 = new PlayerUnreadCount(); _elem2 = new PlayerUnreadCount(); _elem2.Read(iprot); PlayerUnreadCount.Add(_elem2); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }
public void NewMessage(PlayerUnreadCount playerUnreadCount) { send_NewMessage(playerUnreadCount); recv_NewMessage(); }