Network Programming: to maintain sockets or not?

后端 未结 7 1174
耶瑟儿~
耶瑟儿~ 2021-01-12 13:09

I\'m currently translating an API from C# to Java which has a network component.

The C# version seems to keep the input and output streams and the socket open for th

7条回答
  •  猫巷女王i
    2021-01-12 13:51

    If you've only got a single socket on the client and the server, you should keep it open for as long as possible.

提交回复
热议问题