Beispiel #1
0
 private Protocol FindProtocol(E_PROTOCOL_TYPE eProtocolType)
 {
     if (!(protocolList.ContainsKey(eProtocolType)))
     {
         return(null);
     }
     return(protocolList[eProtocolType]);
 }
Beispiel #2
0
        private void FindProtocol(byte[] data)
        {
            LightObject lightObj = LightObject.Deserialize(data);

            lightObj.PrintDump();
            E_PROTOCOL_TYPE protocolType   = (E_PROTOCOL_TYPE)lightObj.GetInt(1);
            Protocol        targetProtocol = FindProtocol(protocolType);

            if (targetProtocol == null)
            {
                Debugs.Log("[EmptyProtocol] 해당 프로토콜을 찾을 수 없습니다.");
                return;
            }
            targetProtocol.Process(lightObj);
        }
Beispiel #3
0
 public Protocol(E_PROTOCOL_TYPE type, BaseProcess process)
 {
     this.type    = type;
     this.process = process;
 }
Beispiel #4
0
 protected virtual void Deserialize(LightObject receiveObject)
 {
     seq           = receiveObject.GetInt(0);
     eProtocolType = (E_PROTOCOL_TYPE)receiveObject.GetInt(1);
     ReadLightObject();
 }
Beispiel #5
0
 private void SetProtocolType()
 {
     eProtocolType = GetProtocolType();
 }