作者:允思顾我在 | 来源:互联网 | 2023-06-25 12:10
Imtryingtofindagoodwaytodetectalossofconnection.我正试图找到一种检测连接丢失的好方法。Myadapterisim
I'm trying to find a good way to detect a loss of connection.
我正试图找到一种检测连接丢失的好方法。
My adapter is implemented as a Fix::Application based on one of the examples. It uses a socket initiator to connect to the fix gateway.
我的适配器基于其中一个示例实现为Fix :: Application。它使用套接字启动器连接到修复网关。
When I unplug the internet it takes about 30 seconds for the Fix::Application's onLogout method to be fired. It seems like some underlying class would be aware that there is a problem with the socket much earlier. Is there a quick way took hook into this?
当我拔掉互联网时,Fix :: Application的onLogout方法需要大约30秒才能被触发。似乎某些底层类会更早地意识到套接字存在问题。是否有一个快速的方式挂钩到这?
3 个解决方案