You've already forked lidgren-network-gen3
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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user