简体   繁体   English

远程处理和套接字具有此断开/重新连接问题

[英]Remoting and Sockets have this disconnect/reconnect problem

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 出现不同的错误...有时,应用程序崩溃,有时不响应

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. 要在关闭后重新绑定到特定的端口号,应该在定义套接字时查看指定SO_REUSEADDR选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM