最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

ip - Qt- tcp connection amd redundancy - Stack Overflow

programmeradmin1浏览0评论

I'm writing a program in qt_c++ which is connected to a tester through a tcp connection. Each side has two ips and all four lan cables (2 from each side) are connected to a switch. Ips are in same range. And each ips make connection to both ips on the other side. Ips in client side : 192.168.1.24 and 1.25 My problem is when the socket with ip 1.24 is disconnected the ip 1.25 is also disconnected. In code while sending a message socket with ip 1.24 is firstly checked and if it is not connected, the socket with ip 1.25 is checked. I should add if the ip 1.24 is not connected from the program start up l, the connection with ip 1.25 works properly.

I set keepalive option because chatgpt offered and it doesn't work !

Thanks in advance:)

发布评论

评论列表(0)

  1. 暂无评论