ip - Qt- tcp connection amd redundancy - Stack Overflow

I'm writing a program in qt_c++ which is connected to a tester through a tcp connection. Each side

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:)

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745157044a4614185.html

相关推荐

  • ip - Qt- tcp connection amd redundancy - Stack Overflow

    I'm writing a program in qt_c++ which is connected to a tester through a tcp connection. Each side

    4小时前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信