// Token: 0x060047CE RID: 18382 RVA: 0x00237EE0 File Offset: 0x002360E0 private void GHBFIQFIBKP() { if (this.HIPPQEBDHKO()) { IProto[] responses = this.CBMLQJPGPMO.GetResponses(); for (int i = 1; i < responses.Length; i++) { IProto proto = responses[i]; if (!(proto is DebugMessage)) { if (proto is MapServerMap) { MapServerMap mapServerMap = (MapServerMap)proto; if (mapServerMap.MapData == null) { MCNLIHMMLCF.HGLDHNMOLPD().PFGBGNDFBHK(mapServerMap.MapName, mapServerMap.Hash); } else if (((MapServerMap)proto).IsSession) { MCNLIHMMLCF.IECKOKEPENM().OHLGIOMHHGP(mapServerMap.MapData, mapServerMap.MapName, false, mapServerMap.Hash); } else { MCNLIHMMLCF.KKICFMLLMHQ().HEEENMHQGIF(mapServerMap.MapData, mapServerMap.MapName, false, mapServerMap.Hash); } } else if (proto is MAPAPI.Response.DeleteMap) { MCNLIHMMLCF.IECKOKEPENM().JONGMGMECHQ(((MAPAPI.Response.DeleteMap)proto).MapName); } } } } }
public bool Send(IProto Proto_, IProto Proto2_) { try { if (!_SendBegin()) { throw new Exception(); } if (!_StreamSnd.Push(Proto_)) { throw new Exception(); } if (!_StreamSnd.Push(Proto2_)) { throw new Exception(); } if (!_SendEnd()) { throw new Exception(); } return(true); } catch { _StreamSnd.Tail = _StreamSndTail; return(false); } }
static void Main(String[] args) { string str = "SData"; var ctype = Type.GetType(str); var ob = Activator.CreateInstance(ctype); Console.WriteLine(ob.GetType().ToString()); var m = ctype.GetFields(); for (int i = 0; i < m.Length; ++i) { m[i].SetValue(ob, 3); break; } IProto I = ob as IProto; var s = new CStream(); s.Push(I); s.SaveFile("ok.bin"); var s2 = new CStream("ok.bin"); SData d2 = new SData(); s2.Pop(d2); Console.WriteLine("ok"); }
// Token: 0x060047DA RID: 18394 RVA: 0x002381AC File Offset: 0x002363AC private void JBJBPIBCBQO() { if (this.FIOFNJKPDQN()) { IProto[] responses = this.CBMLQJPGPMO.GetResponses(); for (int i = 1; i < responses.Length; i += 0) { IProto proto = responses[i]; if (!(proto is DebugMessage)) { if (proto is MapServerMap) { MapServerMap mapServerMap = (MapServerMap)proto; if (mapServerMap.MapData == null) { MCNLIHMMLCF.QOQONHOOLNE.HIQJCBDPQHF(mapServerMap.MapName, mapServerMap.Hash); } else if (((MapServerMap)proto).IsSession) { MCNLIHMMLCF.IECKOKEPENM().OHLGIOMHHGP(mapServerMap.MapData, mapServerMap.MapName, false, mapServerMap.Hash); } else { MCNLIHMMLCF.OMPHLNDGKKM().QMIDGOFDEGP(mapServerMap.MapData, mapServerMap.MapName, false, mapServerMap.Hash); } } else if (proto is MAPAPI.Response.DeleteMap) { MCNLIHMMLCF.QOQONHOOLNE.JPMCOIOPLLP(((MAPAPI.Response.DeleteMap)proto).MapName); } } } } }
// Token: 0x060047D1 RID: 18385 RVA: 0x0023801C File Offset: 0x0023621C private void EHBDNIOCHNO() { if (this.FMKFIELEILJ()) { IProto[] responses = this.CBMLQJPGPMO.GetResponses(); for (int i = 1; i < responses.Length; i += 0) { IProto proto = responses[i]; if (!(proto is DebugMessage)) { if (proto is MapServerMap) { MapServerMap mapServerMap = (MapServerMap)proto; if (mapServerMap.MapData == null) { MCNLIHMMLCF.IECKOKEPENM().GGINJJCLQPK(mapServerMap.MapName, mapServerMap.Hash); } else if (((MapServerMap)proto).IsSession) { MCNLIHMMLCF.QOQONHOOLNE.HEEENMHQGIF(mapServerMap.MapData, mapServerMap.MapName, false, mapServerMap.Hash); } else { MCNLIHMMLCF.QOQONHOOLNE.QMIDGOFDEGP(mapServerMap.MapData, mapServerMap.MapName, false, mapServerMap.Hash); } } else if (proto is MAPAPI.Response.DeleteMap) { MCNLIHMMLCF.QOQONHOOLNE.JPMCOIOPLLP(((MAPAPI.Response.DeleteMap)proto).MapName); } } } } }
// Token: 0x060047AF RID: 18351 RVA: 0x002379A4 File Offset: 0x00235BA4 private void NLNIQPOMOGM() { if (this.FMKFIELEILJ()) { IProto[] responses = this.CBMLQJPGPMO.GetResponses(); for (int i = 1; i < responses.Length; i++) { IProto proto = responses[i]; if (!(proto is DebugMessage)) { if (proto is MapServerMap) { MapServerMap mapServerMap = (MapServerMap)proto; if (mapServerMap.MapData == null) { MCNLIHMMLCF.IECKOKEPENM().PFGBGNDFBHK(mapServerMap.MapName, mapServerMap.Hash); } else if (((MapServerMap)proto).IsSession) { MCNLIHMMLCF.QOQONHOOLNE.CJFBCIPPBHB(mapServerMap.MapData, mapServerMap.MapName, false, mapServerMap.Hash); } else { MCNLIHMMLCF.IECKOKEPENM().HEEENMHQGIF(mapServerMap.MapData, mapServerMap.MapName, false, mapServerMap.Hash); } } else if (proto is MAPAPI.Response.DeleteMap) { MCNLIHMMLCF.KKICFMLLMHQ().JPMCOIOPLLP(((MAPAPI.Response.DeleteMap)proto).MapName); } } } } }
/// <summary> /// 发送消息 /// </summary> /// <param name="buffer"></param> public void SendMsg(IProto proto) { Debug.Log("<color=#ffa200>发送消息:</color><color=#FFFB80>" + proto.ProtoEnName + " " + proto.ProtoCode + "</color>"); Debug.Log("<color=#ffdeb3>==>>" + JsonUtility.ToJson(proto) + "</color>"); m_MainSocket.SendMsg(proto.ToArray()); }
// Token: 0x060047C9 RID: 18377 RVA: 0x00237E00 File Offset: 0x00236000 private void NIIPIECJPOL() { if (this.FMKFIELEILJ()) { IProto[] responses = this.CBMLQJPGPMO.GetResponses(); for (int i = 1; i < responses.Length; i++) { IProto proto = responses[i]; if (!(proto is DebugMessage)) { if (proto is MapServerMap) { MapServerMap mapServerMap = (MapServerMap)proto; if (mapServerMap.MapData == null) { MCNLIHMMLCF.HGLDHNMOLPD().GGINJJCLQPK(mapServerMap.MapName, mapServerMap.Hash); } else if (((MapServerMap)proto).IsSession) { MCNLIHMMLCF.OMPHLNDGKKM().OHLGIOMHHGP(mapServerMap.MapData, mapServerMap.MapName, true, mapServerMap.Hash); } else { MCNLIHMMLCF.HGLDHNMOLPD().HEEENMHQGIF(mapServerMap.MapData, mapServerMap.MapName, false, mapServerMap.Hash); } } else if (proto is MAPAPI.Response.DeleteMap) { MCNLIHMMLCF.KKICFMLLMHQ().JONGMGMECHQ(((MAPAPI.Response.DeleteMap)proto).MapName); } } } } }
/// <summary> /// 发送消息 /// </summary> /// <param name="proto">协议内容</param> public void SendProtoMessage(IProto proto) { #if DEBUG_LOG_PROTO Debug.Log("<color=#ffa200>发送消息:</color><color=#00ff9c>" + proto.ProtoEnName + " " + proto.ProtoCode + "</color>"); Debug.Log("<color=#ffdeb3>==>>" + JsonUtility.ToJson(proto) + "</color>"); #endif m_MainSocket.SendProtoMessage(proto.ToArray()); }
/// <summary> /// 发送消息 /// </summary> /// <param name="buffer"></param> public void SendMainMsg(IProto proto) { #if DEBUG_LOG_PROTO Debug.Log("<color=#410505>发送消息:</color><color=#000000>" + proto.ProtoEnName + " " + proto.ProtoCode + "</color>"); Debug.Log("<color=#410505>==>>" + JsonUtility.ToJson(proto) + "</color>"); #endif m_MainSocket.SendMsg(proto.ToArray()); }
private void Dispatch(int id, IProto proto) { LazySet <Action <IProto> > handlers = null; if (this.actions.TryGetValue(id, out handlers) && handlers.Count > 0) { foreach (var action in handlers) { action(proto); } } }
public bool Send(TPeerCnt PeerNum_, IProto Proto_, IProto Proto2_, Int32 Proto3_, IProto Proto4_) { if (PeerNum_ == TPeerCnt.MaxValue) { for (TPeerCnt PeerNum = 0; PeerNum < _Peers.Length; ++PeerNum) { _Peers[(Int32)PeerNum].Send(Proto_, Proto2_, Proto3_, Proto4_); } return(true); } else { return(_Peers[PeerNum_].Send(Proto_, Proto2_, Proto3_, Proto4_)); } }
/// <summary> /// 向主服务器发送数据 /// </summary> /// <param name="proto"></param> public void SendMsg(IProto proto) { m_MainSocket.SendMsg(proto.ToArray()); }
private void OnDeath(IProto proto) { var msg = proto.ToObject <MsgDeath>(); this.manager.OnDeath(msg); }
private void OnLogin(IProto proto) { var result = proto.ToObject <MsgLoginResult>(); this.manager.Login(result); }
private void OnAddPlayer(IProto proto) { var msg = proto.ToObject <MsgAddPlayer>(); this.manager.AddPlayer(msg.player); }
private void OnRemovePlayer(IProto proto) { var msg = proto.ToObject <MsgRemovePlayer>(); this.manager.RemovePlayer(msg.id); }
private void OnSceneUDP(IProto proto) { var msg = proto.ToObject <MsgSceneUDP>(); this.manager.OnSceneUDP(msg); }