You've already forked lidgren-network-gen3
mirror of
https://github.com/lidgren/lidgren-network-gen3.git
synced 2026-05-16 15:16:33 +09:00
Fixes for RELEASE version to compile
This commit is contained in:
@@ -30,6 +30,7 @@
|
|||||||
<DefineConstants>TRACE</DefineConstants>
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
|
|||||||
@@ -139,6 +139,7 @@ namespace Lidgren.Network
|
|||||||
//
|
//
|
||||||
internal void SendPacket(int numBytes, IPEndPoint target, int numMessages, out bool connectionReset)
|
internal void SendPacket(int numBytes, IPEndPoint target, int numMessages, out bool connectionReset)
|
||||||
{
|
{
|
||||||
|
connectionReset = false;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
int bytesSent = m_socket.SendTo(m_sendBuffer, 0, numBytes, SocketFlags.None, target);
|
int bytesSent = m_socket.SendTo(m_sendBuffer, 0, numBytes, SocketFlags.None, target);
|
||||||
|
|||||||
@@ -11,7 +11,9 @@ namespace BarebonesClient
|
|||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
NetPeerConfiguration config = new NetPeerConfiguration("barebones");
|
NetPeerConfiguration config = new NetPeerConfiguration("barebones");
|
||||||
|
#if DEBUG
|
||||||
config.SimulatedLoss = 0.1f;
|
config.SimulatedLoss = 0.1f;
|
||||||
|
#endif
|
||||||
config.EnableMessageType(NetIncomingMessageType.VerboseDebugMessage);
|
config.EnableMessageType(NetIncomingMessageType.VerboseDebugMessage);
|
||||||
NetClient client = new NetClient(config);
|
NetClient client = new NetClient(config);
|
||||||
client.Start();
|
client.Start();
|
||||||
|
|||||||
@@ -12,7 +12,9 @@ namespace BarebonesServer
|
|||||||
{
|
{
|
||||||
NetPeerConfiguration config = new NetPeerConfiguration("barebones");
|
NetPeerConfiguration config = new NetPeerConfiguration("barebones");
|
||||||
config.Port = 14242;
|
config.Port = 14242;
|
||||||
|
#if DEBUG
|
||||||
config.SimulatedLoss = 0.1f;
|
config.SimulatedLoss = 0.1f;
|
||||||
|
#endif
|
||||||
config.EnableMessageType(NetIncomingMessageType.VerboseDebugMessage);
|
config.EnableMessageType(NetIncomingMessageType.VerboseDebugMessage);
|
||||||
NetServer server = new NetServer(config);
|
NetServer server = new NetServer(config);
|
||||||
server.Start();
|
server.Start();
|
||||||
|
|||||||
Reference in New Issue
Block a user