You've already forked lidgren-network-gen3
mirror of
https://github.com/lidgren/lidgren-network-gen3.git
synced 2026-05-14 14:16:30 +09:00
Resend bug fixed, unit tests expanded, misc cleanup
This commit is contained in:
@@ -28,6 +28,24 @@ namespace UnitTests
|
||||
|
||||
peer.Shutdown("bye");
|
||||
|
||||
// read all message
|
||||
NetIncomingMessage inc;
|
||||
while((inc = peer.ReadMessage()) != null)
|
||||
{
|
||||
switch(inc.MessageType)
|
||||
{
|
||||
case NetIncomingMessageType.DebugMessage:
|
||||
case NetIncomingMessageType.VerboseDebugMessage:
|
||||
case NetIncomingMessageType.WarningMessage:
|
||||
case NetIncomingMessageType.ErrorMessage:
|
||||
Console.WriteLine("Peer message: " + inc.ReadString());
|
||||
break;
|
||||
case NetIncomingMessageType.Error:
|
||||
throw new Exception("Received error message!");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Console.ReadKey();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user