void Recv(CKey Key_, EScProto ScProto_, CStream Stream_) { switch (ScProto_) { case EScProto.AgentOn: { var Proto = new SScAgentOn(); Proto.Push(Stream_); _AddAgent(new CKey(Proto.Key), Proto); } break; case EScProto.AgentOff: { var Proto = new SScAgentOff(); Proto.Push(Stream_); _DelAgent(Proto.Key.PeerNum); } break; case EScProto.ProcOn: { var Proto = new SScProcOn(); Proto.Push(Stream_); _SetProc(_AgentInfos[Proto.Key.PeerNum], Proto.Proc); } break; case EScProto.ProcOff: { var Proto = new SScProcOff(); Proto.Push(Stream_); _UnsetProc(_AgentInfos[Proto.Key.PeerNum]); } break; case EScProto.AgentInfos: { var Proto = new SScAgentInfos(); Proto.Push(Stream_); foreach (var Info in Proto.Infos) { if (Info.Proc.Name == "") { _AddAgent(new CKey(Info.Key), Info.Agent); } else { _AddAgent(new CKey(Info.Key), Info.Agent, Info.Proc); } } } break; case EScProto.AgentOption: { var Proto = new SScAgentOption(); Proto.Push(Stream_); var Agent = _AgentInfos[Proto.AgentKey.PeerNum]; Agent.AgentOption = Proto.Option; Agent.Item.SubItems[(Int32)EField.AgentOption].Text = Agent.AgentOption.ToJsonString(); } break; case EScProto.AgentStat: { var Proto = new SScAgentStat(); Proto.Push(Stream_); var Agent = _AgentInfos[Proto.AgentKey.PeerNum]; Agent.AgentStat[Proto.KeyData.Key] = JsonParser.Parse(Proto.KeyData.Data); Agent.Item.SubItems[(Int32)EField.AgentStat].Text = Agent.AgentStat.ToString(); } break; case EScProto.ProcStat: { var Proto = new SScProcStat(); Proto.Push(Stream_); var Agent = _AgentInfos[Proto.AgentKey.PeerNum]; Agent.ProcStat[Proto.KeyData.Key] = JsonParser.Parse(Proto.KeyData.Data); Agent.Item.SubItems[(Int32)EField.ProcStat].Text = Agent.ProcStat.ToString(); } break; case EScProto.Notify: { var Proto = new SScNotify(); Proto.Push(Stream_); tbOutput.AppendText(Proto.Msg); } break; } }
public override void Pop(CStream Stream_) { Stream_.Push(Time); Stream_.Push(Point); Stream_.Push(Normal); }
public override void Push(CStream Stream_) { Stream_.Pop(ref X); Stream_.Pop(ref Y); }
static void Recv(CKey Key_, CStream Stream_) { Console.WriteLine("Recv:" + Key_.PeerNum.ToString()); }
public override void Pop(CStream Stream_) { Stream_.Push(Size); Stream_.Push(Offset); Stream_.Push(Scale); }
public override void Push(CStream Stream_) { Stream_.Pop(ref Name); Stream_.Pop(ref Port); }
public override void Pop(CStream Stream_) { Stream_.Push(CountryCode); Stream_.Push(MinuteCountOffset); }
public override void Pop(CStream Stream_) { Stream_.Push(NewChildKey); Stream_.Push(SessionCode); }
public override void Pop(CStream Stream_) { Stream_.Push(NewChildKey); }
public override void Push(CStream Stream_) { base.Push(Stream_); Stream_.Pop(ref SessionCode); Stream_.Pop(ChildBindNamePort); }
public override void Pop(CStream Stream_) { Stream_.Push(ClientBindNamePortPub); Stream_.Push(SessionCode); Stream_.Push(NewChildKey); }
public override void Pop(CStream Stream_) { base.Pop(Stream_); Stream_.Push(ChildCntMax); Stream_.Push(ErrorCnt); }
public override void Pop(CStream Stream_) { Stream_.Push(ClientCnt); Stream_.Push(ServerCnt); }
public override void Push(CStream Stream_) { Stream_.Pop(ref ClientCnt); Stream_.Pop(ref ServerCnt); }
public override void Pop(CStream Stream_) { Stream_.Push(Size); Stream_.Push(CheckSum); Stream_.Push(SendPacketSeq); }
public override void Pop(CStream Stream_) { Stream_.Push(ChildBindNamePort); Stream_.Push(SessionCode); }
public override void Pop(CStream Stream_) { Stream_.Push((SByte)PacketType); Stream_.Push(RecvPacketSeq); }
public override void Pop(CStream Stream_) { Stream_.Push(ClientBindNamePortPub); }
public override void Pop(CStream Stream_) { Stream_.Push(Name); Stream_.Push(Port); }
public override void Push(CStream Stream_) { }
public override void Pop(CStream Stream_) { Stream_.Push(PeerNum); Stream_.Push(PeerCounter); }
public override void Pop(CStream Stream_) { }
public override void Pop(CStream Stream_) { Stream_.Push(Pos); Stream_.Push(Dir); }
public override void Pop(CStream Stream_) { Stream_.Push((Int32)Proto); }
public override void Push(CStream Stream_) { Stream_.Pop(ref Time); Stream_.Pop(Point); Stream_.Pop(Normal); }
public JsonDataObject Push(string Name_, CStream Data_) { Add(Name_); Push(Data_); return(this); }
public override void Pop(CStream Stream_) { Stream_.Push(Y); }
public override void Push(CStream Stream_) { Stream_.Pop(ref Size); Stream_.Pop(ref CheckSum); Stream_.Pop(ref SendPacketSeq); }
public override void Pop(CStream Stream_) { Stream_.Push(Point0); Stream_.Push(Point1); }
static void Recv(CKey Key_, CStream Stream_) { int i = 0; Stream_.Pop(ref i); Console.WriteLine("Recv:" + Key_.PeerNum + "value:" + i.ToString()); }