From 4af3f80448201eaad3c9289ef3cee3e0ee29fa62 Mon Sep 17 00:00:00 2001 From: vrandkode Date: Sat, 3 Dec 2016 22:31:01 +0100 Subject: [PATCH 1/2] Avoid SocketException scenario caused due to incompatibility of using ioctl system calls under a Mono environment --- SocketEngine/UdpSocketListener.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SocketEngine/UdpSocketListener.cs b/SocketEngine/UdpSocketListener.cs index 44850f946..78d0ea8e3 100644 --- a/SocketEngine/UdpSocketListener.cs +++ b/SocketEngine/UdpSocketListener.cs @@ -35,8 +35,8 @@ public override bool Start(IServerConfig config) m_ListenSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true); m_ListenSocket.Bind(this.EndPoint); - //Mono doesn't support it - if (Platform.SupportSocketIOControlByCodeEnum) + // Mono doesn't support it as no ioctl call in Mono.Unix.Native + if (Platform.SupportSocketIOControlByCodeEnum && !Platform.isMono) { uint IOC_IN = 0x80000000; uint IOC_VENDOR = 0x18000000; From 6ede99683ce6c8fc254b864afb1e9d0b85de9061 Mon Sep 17 00:00:00 2001 From: vrandkode Date: Mon, 5 Dec 2016 17:20:38 +0100 Subject: [PATCH 2/2] Update UdpSocketListener.cs --- SocketEngine/UdpSocketListener.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SocketEngine/UdpSocketListener.cs b/SocketEngine/UdpSocketListener.cs index 78d0ea8e3..1f1735cc2 100644 --- a/SocketEngine/UdpSocketListener.cs +++ b/SocketEngine/UdpSocketListener.cs @@ -36,7 +36,7 @@ public override bool Start(IServerConfig config) m_ListenSocket.Bind(this.EndPoint); // Mono doesn't support it as no ioctl call in Mono.Unix.Native - if (Platform.SupportSocketIOControlByCodeEnum && !Platform.isMono) + if (Platform.SupportSocketIOControlByCodeEnum && !Platform.IsMono) { uint IOC_IN = 0x80000000; uint IOC_VENDOR = 0x18000000;