On one of our desktop computers, we get a strange error when running this code:
IPAddress ipaddress = IPAddress.Parse(sIPDaddress); var endpoint = new IPEndPoint(ipaddress, m_iPort); listener.Bind(endpoint); listener.Blocking = true; listener.Listen(-1);
We get the following error 10014 in the bind command:
WSAEFAULT 10014 Bad address. The system detected an invalid address pointer while trying to use the call pointer argument. This error occurs if the application passes an invalid pointer value or if the buffer length is too short. For example, if the length of the argument, which is a sockaddr structure, is less than SizeOf (SOCKADDR).
Initially, we thought that this was a network problem, but my laptop working with the same code works when connected to its network port.
ip4, , . , .
, ?
:
Socket listener = new Socket(0, SocketType.Stream, ProtocolType.Tcp);
Socket listener = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
.
, , .
, , ipconfig , IPV6 Link-local. IPV6- Link-local. , .