c# - Cannot create a UdpClient on IPv6 -
what thought simple task, has turned bit of nightmare.
what boils down now, need create udp listener on port 8888, on specific link local ipv6 address.
i exception thrown when following line executed:
_udpsoc = new udpclient(monitor_input_event_socket, addressfamily.internetworkv6);
(where monitor_input_event_socket const int of value 8888)
having tried support, find an msdn article describing same line.
the socketexception thrown "the requested address not valid in context" errorcode of 10049 stacktrace of:
at system.net.sockets.socket.dobind(endpoint endpointsnapshot, socketaddress socketaddress) @ system.net.sockets.socket.bind(endpoint localep) @ system.net.sockets.udpclient..ctor(int32 port, addressfamily family) @ [my code...]
alternatively, if change problem line to:
_udpsoc = new udpclient(_groupep);
(where _groupep ipendpoint set ipaddress.any, scopeid set the correct interface, , port of monitor_input_event_socket)
...and exception of "the requested address not valid in context", same errorcode , stack trace before.
what's going wrong?
Comments
Post a Comment