Running on .NET Core (2.1.401) under MacOS (10.13.6) and using a SocketDatagramChannel I get the following error when I am testing an Outbound handler that wraps my byte buffer into a DatagramPacket
Running the same code under Windows 10 and .NET Core (2.1.401) No PlatformNotSupportedException is thrown
var packet = new DatagramPacket(
message: (IByteBuffer)message,
recipient: new IPEndPoint(IPAddress.Loopback, port:10000)
);
return context.WriteAndFlushAsync(packet);
Exception: System.PlatformNotSupportedException: This platform does not support packet information for dual-mode sockets. If packet information is not required, use Socket.Receive. If packet information is required set Socket.DualMode to false.
at System.Net.Sockets.SocketPal.CheckDualModeReceiveSupport(Socket socket)
at System.Net.Sockets.Socket.ReceiveFromAsync(SocketAsyncEventArgs e)
at DotNetty.Transport.Channels.Sockets.SocketDatagramChannel.ScheduleSocketRead()
at DotNetty.Transport.Channels.AbstractChannel.AbstractUnsafe.BeginRead()
Is there a way to disable the DualMode flag? I passed my own new Socket(.. udp ..).DualMode = false to a .ChannelFactory(() => new SocketDatagramChannel(socket)) but that didn't seem to do it.
I get that it's a NET Core issue, what I am looking for is a way around that.
Running on .NET Core (2.1.401) under MacOS (10.13.6) and using a
SocketDatagramChannel
I get the following error when I am testing an Outbound handler that wraps my byte buffer into aDatagramPacket
Running the same code under Windows 10 and .NET Core (2.1.401) No
PlatformNotSupportedException
is thrownIs there a way to disable the DualMode flag? I passed my own
new Socket(.. udp ..).DualMode = false
to a.ChannelFactory(() => new SocketDatagramChannel(socket))
but that didn't seem to do it.I get that it's a NET Core issue, what I am looking for is a way around that.