You've already forked lidgren-network-gen3
mirror of
https://github.com/lidgren/lidgren-network-gen3.git
synced 2026-05-19 08:36:34 +09:00
SIO_UDP_CONNRESET now try-catched since not available in mono
This commit is contained in:
@@ -106,10 +106,17 @@ namespace Lidgren.Network
|
|||||||
m_socket.Blocking = false;
|
m_socket.Blocking = false;
|
||||||
m_socket.Bind(ep);
|
m_socket.Bind(ep);
|
||||||
|
|
||||||
const uint IOC_IN = 0x80000000;
|
try
|
||||||
const uint IOC_VENDOR = 0x18000000;
|
{
|
||||||
uint SIO_UDP_CONNRESET = IOC_IN | IOC_VENDOR | 12;
|
const uint IOC_IN = 0x80000000;
|
||||||
m_socket.IOControl((int)SIO_UDP_CONNRESET, new byte[] { Convert.ToByte(false) }, null);
|
const uint IOC_VENDOR = 0x18000000;
|
||||||
|
uint SIO_UDP_CONNRESET = IOC_IN | IOC_VENDOR | 12;
|
||||||
|
m_socket.IOControl((int)SIO_UDP_CONNRESET, new byte[] { Convert.ToByte(false) }, null);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
// ignore; SIO_UDP_CONNRESET not supported on this platform
|
||||||
|
}
|
||||||
|
|
||||||
IPEndPoint boundEp = m_socket.LocalEndPoint as IPEndPoint;
|
IPEndPoint boundEp = m_socket.LocalEndPoint as IPEndPoint;
|
||||||
LogDebug("Socket bound to " + boundEp + ": " + m_socket.IsBound);
|
LogDebug("Socket bound to " + boundEp + ": " + m_socket.IsBound);
|
||||||
|
|||||||
Reference in New Issue
Block a user