Do TCP sockets automatically close after some time if no data is sent?

前端 未结 4 1848
一向
一向 2021-02-03 10:15

I have a client server situation where the client opens a TCP socket to the server, and sometimes long periods of time will pass with no data being sent between them. I have enc

4条回答
  •  梦谈多话
    2021-02-03 11:11

    TCP sockets don't automatically close at all. However TCP connections do. But if this is happening between peers in the same computer the connection should never be dropped as long as both peers exist and have their sockets open.

提交回复
热议问题