Close listening socket in python thread

后端 未结 5 921
一生所求
一生所求 2021-01-04 10:07

I have a problem trying to learn about sockets for network communication. I have made a simple thread that listens for connections and creates processes for connecting clien

5条回答
  •  悲哀的现实
    2021-01-04 10:50

    Partially tested solution

    1. Put self.socket.settimeout(0.1) right before while
    2. Put conn.settimeout(None) right after accept

提交回复
热议问题