diff --git a/RtspClientSharp/Utils/NetworkClientFactory.cs b/RtspClientSharp/Utils/NetworkClientFactory.cs index c402b81..35d831a 100644 --- a/RtspClientSharp/Utils/NetworkClientFactory.cs +++ b/RtspClientSharp/Utils/NetworkClientFactory.cs @@ -1,4 +1,5 @@ -using System.Net.Sockets; +using System; +using System.Net.Sockets; namespace RtspClientSharp.Utils { @@ -27,8 +28,17 @@ public static Socket CreateUdpClient() ReceiveBufferSize = UdpReceiveBufferDefaultSize, DualMode = true }; - socket.IOControl((IOControlCode)SIO_UDP_CONNRESET, EmptyOptionInValue, null); + + try + { + socket.IOControl((IOControlCode)SIO_UDP_CONNRESET, EmptyOptionInValue, null); + } + catch (PlatformNotSupportedException) + { + + } + return socket; } } -} \ No newline at end of file +}