docs: def stop(self):
          """Called to stop the reveiver thread."""
          self._stop_thread.set()
          # f you want to close the connection in a timely fashion,
          # call shutdown() before close().
          with self._lock:  # Receive thread might use the socket
              self.receive_socket.shutdown(socket.SHUT_RDWR)
              self.receive_socket.close()
  
          self.send_socket.shutdown(socket.SHUT_RDWR)
          self.send_socket.close()