Socket not connecting after first connection failure

后端 未结 1 1652
闹比i
闹比i 2021-01-15 18:29

I don\'t understand why the following program doesn\'t work when the initial connect fails (I intentionally start the server socket after the first connect fails):



        
相关标签:
1条回答
  • 2021-01-15 19:12

    You can't reconnect a socket that has already failed to connect. You have to close it and try again with a new socket. The documentation you're looking for would be at the Berkeley Sockets API level, not Java,

    0 讨论(0)
提交回复
热议问题