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

Improved performance (very slightly) when batch recycling incoming messages

This commit is contained in:
lidgren
2011-09-25 10:38:57 +00:00
parent 9e3104f5da
commit 36bf73bfbe
5 changed files with 60 additions and 15 deletions

View File

@@ -17,6 +17,8 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH
USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
//#define USE_RELEASE_STATISTICS
using System;
using System.Collections.Generic;
using System.Net;
@@ -228,6 +230,9 @@ namespace Lidgren.Network
//
internal void SendPacket(int numBytes, IPEndPoint target, int numMessages, out bool connectionReset)
{
#if USE_RELEASE_STATISTICS
m_statistics.PacketSent(numBytes, numMessages);
#endif
connectionReset = false;
try
{