コード例 #1
0
ファイル: StreamProcessor.cs プロジェクト: Adevien/Linker
 public void ReadPacket(byte[] data, object link)
 {
     try
     {
         if (data.Length > 0)
         {
             GetCallbackFromData(data)(data, link);
         }
     }
     catch (Exception)
     {
         Console.WriteLine("Empty data in Processor");
     }
 }
コード例 #2
0
 /// <summary>
 /// Reads one packet from NetDataReader and calls OnReceive delegate
 /// </summary>
 /// <param name="reader">NetDataReader with packet</param>
 /// <param name="userData">Argument that passed to OnReceivedEvent</param>
 /// <exception cref="ParseException">Malformed packet</exception>
 public void ReadPacket(NetDataReader reader, object userData)
 {
     GetCallbackFromData(reader)(reader, userData);
 }