I\'ve written an IP multicasting application in C#. It compiles fine, but at runtime this line:
sock.SetSocketOption(SocketOptionLevel.IP,
You can encounter this error message if resource limits are being exceeded. A System.Net.Sockets.Socket
implements IDisposable
. Are you disposing of your socket(s) once you're finished with them?
Leaving them around for the garbage collector is an excellent way to leak resources.
This seems to happen when you run out of resources (sockets?) or memory. At the command prompt run: netstat -ab
I'm not sure off hand what the socket limit is. I'm currently fighting an issue like this myself.
Notes on socket limits: http://support.microsoft.com/kb/196271