public void SendAll(SProto Proto_, Int32 ProtoNum_, SProto Proto2_) // unity덕분으로 .net 버젼이 낮아 dynamic 으로 처리불가하여 이렇게 처리... { foreach (var i in _PeersExt) { if (i.DoesWillClose()) { continue; } try { i.Send(Proto_, ProtoNum_, Proto2_); } catch { i.WillClose(TimeSpan.Zero); continue; } if (!i.itPeerWillExpire) { _Net.Send(i.NetKey, new SHeaderCs(EProtoCs.UserProto), Proto_, ProtoNum_, Proto2_); } } }
public void Send(SProto Proto_) { CStream Stream = new CStream(); Stream.Push(Proto_); SendProtos.Add(Stream); }
public void SendAll(SProto Proto_, Int32 Proto2_, SProto Proto3_) // unity덕분으로 .net 버젼이 낮아 dynamic 으로 처리불가하여 이렇게 처리... { foreach (var Peer in _Peers) { Peer.Send(Proto_, Proto2_, Proto3_); } }
public void Send(SProto Proto_, CStream Stream_) // TODO : 닷넷 버전 제한으로 dynamic 불가하여 이렇게 처리, 유니티 제한 풀리면 코드 수정 요 { if (DoesWillClose()) { return; } try { _SendBegin(); _StreamSnd.Push(Proto_); _StreamSnd.Push(Stream_); _SendEnd(); } catch (Exception e) { if (e.GetType() == typeof(SocketException)) { WillClose(TimeSpan.Zero, ENetRet.SocketError); } else { WillClose(TimeSpan.Zero, ENetRet.SystemError); } } }
public void Send(CKey Key_, SProto Proto_, Int32 ProtoNum_, SProto Proto2_) // unity덕분으로 .net 버젼이 낮아 dynamic 으로 처리불가하여 이렇게 처리... { var itPeerExt = _PeersExt.Get((Int32)Key_.PeerNum); if (!itPeerExt) { return; } if (!itPeerExt.Data.Key.Equals(Key_)) { return; } if (itPeerExt.Data.DoesWillClose()) { return; } try { itPeerExt.Data.Send(Proto_, ProtoNum_, Proto2_); } catch { itPeerExt.Data.WillClose(TimeSpan.Zero); return; } if (!itPeerExt.Data.itPeerWillExpire) { _Net.Send(itPeerExt.Data.NetKey, new SHeaderCs(EProtoCs.UserProto), Proto_, ProtoNum_, Proto2_); } }
public JsonDataArray Push(SProto Data_) { var Collection = new JsonDataObject(); _Array.Add(Collection); Data_.Pop(Collection); return(this); }
public void Send(TPeerCnt PeerNum_, SProto Proto0_, SProto Proto1_) { if (!_Servers[(Int32)PeerNum_].Logon) { return; } _NetS.Send(PeerNum_, new SHeader(EProto.CsUserProto), Proto0_, Proto1_); }
public void Send(CKey Key_, SProto Proto_) { if (_Servers[(Int32)Key_.PeerNum].PeerCounter != Key_.PeerCounter) { return; } _NetS.Send(Key_.PeerNum, new SHeader(EProto.CsUserProto), Proto_); }
public void Send(SProto Proto_, Int32 ProtoNum_, SProto Proto2_) { CStream Stream = new CStream(); Stream.Push(Proto_); Stream.Push(ProtoNum_); Stream.Push(Proto2_); SendProtos.Add(Stream); }
public void SendAll(SProto Proto_) { for (var it = _Servers.Begin(); it != _Servers.End(); it.MoveNext()) { if (!it.Data.Logon) { continue; } _NetS.Send((TPeerCnt)it.Index, new SHeader(EProto.CsUserProto), Proto_); } }
public void SendAllExcept(CKey Key_, Int32 ProtoNum_, SProto Proto_) { foreach (var Peer in _Peers) { if (Peer.Key.Equals(Key_)) { continue; } Peer.Send(ProtoNum_, Proto_); } }
public void Send(TPeerCnt PeerNum_, SProto Proto_, SProto Proto2_) { var itServer = _Servers.Get((Int32)PeerNum_); if (!itServer || itServer.Data.State != _EState.Allocated) { return; } _Net.Send(PeerNum_, (Int32)EProto.CsUserProto, Proto_, Proto2_); }
public void SendAll(SProto Proto_) { foreach (var i in _Servers) { if (i.State != _EState.Allocated) { continue; } _Net.Send(i.Key.PeerNum, (Int32)EProto.CsUserProto, Proto_); } }
public void Send(CKey Key_, SProto Proto_, SProto Proto2_) { var itServer = _Servers.Get((Int32)Key_.PeerNum); if (!itServer || itServer.Data.Key.PeerCounter != Key_.PeerCounter || itServer.Data.State != _EState.Allocated) { return; } _Net.Send(Key_.PeerNum, (Int32)EProto.CsUserProto, Proto_, Proto2_); }
public void Send(CKey Key_, SProto Proto_, SProto Proto2_, Int32 Proto3_, SProto Proto4_) // unity덕분으로 .net 버젼이 낮아 dynamic 으로 처리불가하여 이렇게 처리... { var itPeer = _Peers.Get((Int32)Key_.PeerNum); if (!itPeer) { return; } if (itPeer.Data.Key.PeerCounter != Key_.PeerCounter) { return; } itPeer.Data.Send(Proto_, Proto2_, Proto3_, Proto4_); }
public void SendAllExcept(CKey Key_, SProto Proto_) { foreach (var i in _Servers) { if (i.State != _EState.Allocated) { continue; } if (i.Key.Equals(Key_)) { continue; } _Net.Send(i.Key.PeerNum, (Int32)EProto.CsUserProto, Proto_); } }
public JsonDataObject Push(string Name_, SProto Data_) { Add(Name_); _JsonDataArray.Push(Data_); return(this); }
public CStream(SProto Proto_) { Proto_.Pop(this); }
public void Send(TPeerCnt PeerNum_, SProto Proto_, SProto Proto2_, Int32 Proto3_, SProto Proto4_) // unity덕분으로 .net 버젼이 낮아 dynamic 으로 처리불가하여 이렇게 처리... { _Peers[(Int32)PeerNum_].Send(Proto_, Proto2_, Proto3_, Proto4_); }
public CStream Push(SProto Proto_) { Proto_.Pop(this); return(this); }
public JsonDataArray Pop(Int32 Index_, SProto Data_) { Data_.Push((JsonDataObject)_Array[Index_]); return(this); }
public CStream(SProto Proto_) { Push(Proto_); }
public JsonDataObject Pop(string Name_, SProto Data_) { _JsonDataArray.Pop(_NameIndices[Name_], Data_); return(this); }
public JsonDataObject(SProto Proto_) { Proto_.Pop(this); }
public void Send(TPeerCnt PeerNum_, SProto Proto_, CStream Stream_) // unity덕분으로 .net 버젼이 낮아 dynamic 으로 처리불가하여 이렇게 처리... { _Peers[(Int32)PeerNum_].Send(Proto_, Stream_); }