Ejemplo n.º 1
0
 private void Debug(string context)
 {
     lock (_debugMutex)
     {
         var str = $"{(IsServer ? "[SERVER]" : "[CLIENT]")}";
         RUDPLog.Info($"{str} : {context}");
     }
 }
Ejemplo n.º 2
0
 private void Debug(string context)
 {
     lock (_debugMutex)
     {
         //Console.ForegroundColor = IsServer ? ConsoleColor.Cyan : ConsoleColor.Green;
         var str = $"{(IsServer ? "[SERVER]" : "[CLIENT]")}";
         RUDPLog.Info($"{str} : {context}");
         //Console.ResetColor();
     }
 }
Ejemplo n.º 3
0
 public virtual void PacketReceive(IPEndPoint ep, byte[] data, int length)
 {
     RUDPLog.Trace($"RECV <- {ep}: {Encoding.UTF8.GetString(data, 14, length)}");
 }
Ejemplo n.º 4
0
 public virtual int PacketSending(IPEndPoint endPoint, byte[] data, int length)
 {
     RUDPLog.Trace($"SEND -> {endPoint}: {Encoding.UTF8.GetString(data, 14, length)}");
     return(-1);
 }