我正在尝试使用托管媒体聚合 C# 库 ( http://net7mma.codeplex.com ) 来处理来自 Freebox 机顶盒的 RTSP/RTP 流。
虽然该库可以很好地处理示例 RTSP 提要,但在处理来 self 的机顶盒的提要时,RTP 监听器套接字(一个简单的 UDP 套接字,用于监听特定端口上的每个收入)抛出 SocketException:ConnectionReset,并且接收时当然没有数据显示 (数据显示在 Wireshark 中)。
通过 SocketIO 技巧抑制 E_CONNRESET 并没有多大作用,仍然没有数据进入套接字。
什么会导致这种行为?
(如有必要,我可以提供源代码或 Wireshark 跟踪)
最佳答案
Microsoft explain 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.
问题实际上不是连接重置而是可达性。
MSDN explain错误 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.
关于c# - 什么会导致 UDP 套接字上的 ConnectionReset?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15228272/