远程处理和套接字存在断开/重新连接问题

发布于 2024-07-18 07:42:21 字数 153 浏览 2 评论 0 原文

为什么套接字/远程处理在反复断开和重新连接时无法顺利工作? 我被迫终止服务器和客户端应用程序并再次重新打开它们。

这个问题的解决方法是什么?

谢谢

编辑:这个问题没有任何问题。 出现不同的错误...有时,应用程序崩溃,有时不响应

Why doesn't sockets/remoting have the ability to work smoothly when disconnected and reconnected repeatedly? I'm forced to kill both the server and client application and reopen them again.

What is the fix for this issue?

Thanks

Edit: There's no one problem with this issue. Different errors come up...Sometimes,the application crashes and sometimes does does not respond

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

泼猴你往哪里跑 2024-07-25 07:42:21

操作系统将在定义的时间段内保留套接字引用,以处理网络上剩余的/从客户端发送的任何消息。 要在关闭后重新绑定到特定端口号,您应该查看指定 SO_REUSEADDR 选项。

The OS will hold socket references for a defined time period to handle any messages remaining on the network/sent from clients. To rebind to a particular port number after shutdown you should have a look at specifying the SO_REUSEADDR option when defining your sockets.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文