问题描述
我已经写在C#中的IP多播应用程序。它编译罚款,但在运行时这一行:
I've written an IP multicasting application in C#. It compiles fine, but at runtime this line:
sock.SetSocketOption(SocketOptionLevel.IP,
SocketOptionName.AddMembership,
new MulticastOption(IPAddress.Parse("224.100.0.1")));
引发未处理的插座异常:
throws an unhandled socket exception:
不能因为系统缺乏足够的缓冲空间,或者执行套接字上的操作,因为队列已满
我搜索在谷歌的错误,人提议移除3GB开关(我的操作系统是Windows 7)可能已启用。我这样做,但仍然得到同样的错误。可能是什么问题?
I searched for the error in Google and people have suggested to remove the 3GB switch (my OS is Windows 7) which may have been enabled. I did that, but still get the same error. What could be the issue?
推荐答案
这可能是端口耗尽。
当应用程序(S)使得在较短的时间内过多的出站连接或者不妥善处置传出连接 - 你用完了端口
It could be port exhaustion. When application(s) makes too many outgoing connections in short time frame or does not dispose outgoing connections properly - you run out of ports.
的是链接到相当长的解释和一个方法来诊断问题。
Here is the link to rather lengthy explanation and a way to diagnose the issue
这篇关于"不能因为系统缺少足够的缓冲区空间,或因为队列已满"执行套接字上的操作;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!