用mina做了一个UDP接收的程序,绑定的时候没有指定IP,只是指定了端口。

然后还是在本机连接127.0.0.1和UDP端口号,死活收不到数据。

用TCP/UDP工具发送数据,提示如下:

        The virtual circuit was reset by the remote side executing a hard or abortive close. The application should close the socket as it is no longer usable. On a UPD-datagram socket this error would indicate that a previous send operation resulted in an ICMP "Port Unreachable" message.

解决办法:

没有指定IP,就是默认0.0.0.0。

改为在具体的IP地址绑定,例如192.168.0.10,发现能收到数据。

相关文章:

  • 2021-10-19
  • 2022-12-23
  • 2022-01-01
  • 2021-08-20
  • 2021-06-22
  • 2022-12-23
  • 2022-12-23
  • 2021-12-22
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-04-14
  • 2022-12-23
  • 2021-11-04
  • 2022-12-23
相关资源
相似解决方案