예제 #1
0
 private void ProcessData()
 {
     byte[] bytes = CommandFactory.Process(SmartObject.Parse(Encoding.UTF8.GetString(_receiver.Buffer)));
     if (bytes != null)
     {
         _sender = new Sender(bytes, _bufferSize);
         #if DEBUG
         Logger.InfoFormat("sessionID:{0} process data success.", _sessionID);
         #endif
     }
     else
     {
         #if DEBUG
         Logger.InfoFormat("sessionID:{0} process data fail.", _sessionID);
         #endif
         throw new NotSupportedException("Does not match the command!");
     }
 }