1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-15 06:36:30 +09:00

Added NetPeer.ThrowOrLog

Changed a bunch of exceptions for consistency and safety
Enabled AutoExpandMTU for SpeedSample
This commit is contained in:
lidgren
2014-07-31 13:16:09 +00:00
parent 85a3b28bbf
commit 04593ef00f
10 changed files with 71 additions and 39 deletions

View File

@@ -327,6 +327,19 @@ namespace Lidgren.Network
SendPacket(length, destination, 1, out unused);
}
/// <summary>
/// In DEBUG, throws an exception, in RELEASE logs an error message
/// </summary>
/// <param name="message"></param>
internal void ThrowOrLog(string message)
{
#if DEBUG
throw new NetException(message);
#else
LogError(message);
#endif
}
/// <summary>
/// Disconnects all active connections and closes the socket
/// </summary>