什么会导致 UDP 套接字上的 ConnectionReset? [英] What would cause a ConnectionReset on an UDP socket?

查看:81
本文介绍了什么会导致 UDP 套接字上的 ConnectionReset?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用托管媒体聚合 C# 库 (http://net7mma.codeplex.com) 处理来自 Freebox 机顶盒的 RTSP/RTP 流.

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.

尽管该库与示例 RTSP 提要一起工作正常,但在处理来自我的机顶盒的提要时,RTP 侦听器套接字(一个简单的 UDP 套接字侦听特定端口上的每个收入)抛出 SocketException : ConnectionReset 和当然在接收时没有数据显示(数据显示在 Wireshark 中).

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).

通过 SocketIO 技巧抑制 E_CONNRESET 并没有太大作用,仍然没有数据进入套接字.

Suppressing E_CONNRESET via the SocketIO trick did not much, still no data coming in the socket.

什么会导致这种行为?

(如有必要,我可以提供源或 Wireshark 跟踪)

(I can provide the source or Wireshark traces if necessary)

推荐答案

微软解释 SIO_UDP_CONNRESET的真正含义:

Microsoft explain the true meaning of SIO_UDP_CONNRESET:

SIO_UDP_CONNRESET(操作码设置:I, T==3)

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 解释 错误 WSAECONNRESET:

MSDN explain the error WSAECONNRESET:

WSAECONNRESET

WSAECONNRESET

虚拟电路被远程端执行硬或流产关闭.应用程序应该关闭套接字;不是使用时间更长.在 UDP 数据报套接字上,此错误表示之前的发送操作导致了 ICMP 端口无法访问消息.

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.

这篇关于什么会导致 UDP 套接字上的 ConnectionReset?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆