Socket.Close doesn't really close tcp socket? (c#)

前端 未结 4 706
时光取名叫无心
时光取名叫无心 2021-02-05 22:16

It seems that using socket.Close() for a tcp socket, doesn\'t fully close the socket. In the following example I\'m trying to connect to example.com at port 9999, which is not o

4条回答
  •  失恋的感觉
    2021-02-05 22:56

    You are initialising a new Socket in every Loop... with *.close() you close the old and at the begin you are creating a new one with the same parameters as the Socket before.

提交回复
热议问题