Socket.bind() returns “The requested address is not valid in its context.” on Win7

前端 未结 1 1834
梦如初夏
梦如初夏 2020-12-19 05:49

I am trying to use the Socket.bind() function this way:

Bind(new IPEndPoint(myInternalAddress, myPort));

The error I am getting is \"The re

相关标签:
1条回答
  • 2020-12-19 06:39

    bind() ... binds a socket to local IP address and port. That's what IPEndPoint takes in its constructor (see IPEndPoint(address, port)). Looks like you are passing local and remote addresses there instead.

    Edit:

    If none of the ports work then it's probably the IP address that is wrong. Since you mention an "upgrade" - see what changed - is the address still the same? ipconfig - hint, hint.

    0 讨论(0)
提交回复
热议问题