Shutting down sockets properly

前端 未结 3 1198
暖寄归人
暖寄归人 2021-01-15 02:00

I\'m trying to make a server / client connection with sockets. But they will not close properly and I can\'t wrap my head around why.

Update 1

I\'ve corre

3条回答
  •  臣服心动
    2021-01-15 02:10

    you are calling s.close, instead of s.close().

    you need to invoke the socket.close() method if you want the client to terminate the connection.`

提交回复
热议问题