c# - 什么会导致 UDP 套接字上的 ConnectionReset?

标签 c# sockets rtsp rtp

我正在尝试使用托管媒体聚合 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/

相关文章:

rtsp - 我的 rtsp 方法有什么问题? (服务器总是回复 459)

c# - SMO.Restore.SqlRestore 有时会在部署的计算机上引发超时异常

sockets - Rust 持久化 TcpStream

c++ - 在 Visual Studio C++ 上使用 ffmpeg 库编码视频时出现断言错误

android - 使用计算机名称的套接字连接有问题吗?

Python socket.recv 未从页面获取所有数据

c# - 如何将网络摄像头视频+音频发送到rtsp/rtmp服务器

c# - 使 Contract.Assert 抛出异常而不是显示对话框

c# - 镜像网格和错误的 UV 贴图运行时导出

c# - 单元测试类继承自ContextBoundObject并装饰有ContextAttribute