I'm trying to work with the Managed Media Aggregation C# library (http://net7mma.codeplex.com) to handle a RTSP/RTP stream from a Freebox Set top box.
Although the lib works fine with the sample RTSP feed, when working with the feed from my set top box, the RTP listener socket (a simple UDP socket listening every income on a specific port) throws a SocketException : ConnectionReset, and of course no data shows while Receiving (The data shows in Wireshark).
Suppressing E_CONNRESET via the SocketIO trick did not much, still no data coming in the socket.
What would cause such a behavior ?
(I can provide the source or Wireshark traces if necessary)
Microsoft explain the true meaning of SIO_UDP_CONNRESET:
SIO_UDP_CONNRESET (opcode setting: I, T==3)
Windows XP: Controls whether UDP PORT_UNREACHABLE messages are reported. - Set to TRUE to enable reporting. - Set to FALSE to disable reporting.
The problem is in fact not connection reset but reachability.
MSDN explain the error WSAECONNRESET:
WSAECONNRESET
The virtual circuit was reset by the remote side executing a hard or abortive close. The application should close the socket; it is no longer usable. On a UDP-datagram socket this error indicates a previous send operation resulted in an ICMP Port Unreachable message.