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

Fixes for RELEASE version to compile

This commit is contained in:
lidgren
2010-06-22 06:59:19 +00:00
parent 14d3f3b390
commit 77d480e3cb
4 changed files with 6 additions and 0 deletions

View File

@@ -30,6 +30,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />

View File

@@ -139,6 +139,7 @@ namespace Lidgren.Network
//
internal void SendPacket(int numBytes, IPEndPoint target, int numMessages, out bool connectionReset)
{
connectionReset = false;
try
{
int bytesSent = m_socket.SendTo(m_sendBuffer, 0, numBytes, SocketFlags.None, target);

View File

@@ -11,7 +11,9 @@ namespace BarebonesClient
static void Main(string[] args)
{
NetPeerConfiguration config = new NetPeerConfiguration("barebones");
#if DEBUG
config.SimulatedLoss = 0.1f;
#endif
config.EnableMessageType(NetIncomingMessageType.VerboseDebugMessage);
NetClient client = new NetClient(config);
client.Start();

View File

@@ -12,7 +12,9 @@ namespace BarebonesServer
{
NetPeerConfiguration config = new NetPeerConfiguration("barebones");
config.Port = 14242;
#if DEBUG
config.SimulatedLoss = 0.1f;
#endif
config.EnableMessageType(NetIncomingMessageType.VerboseDebugMessage);
NetServer server = new NetServer(config);
server.Start();