Speed up with threads

Michael Gilfix mgilfix at eecs.tufts.edu
Tue Aug 6 22:23:37 CEST 2002

  Tim O'Maelleys' timeoutsocket module is no longer needed as of 2.3
(the current CVS). The timeoutsocket functionality has been integrated
into the existing socket library.

  >>> import socket
  >>> f = socket.socket ()
  >>> # Set a 2.3 second timeout
  >>> f.set_timeout (2.3)
  >>> # Disable timeout
  >>> f.set_timeout (None)

                    -- Mike

On Tue, Aug 06 @ 15:06, Tim Lavoie wrote:
> In article <107nkusp5q6fiaqnmhfd5kgd664j41t6d1 at 4ax.com>, Rhymes wrote:
> > 
> > I've written a simple portscanner (two version: the first without
> > threads and the second one with threads). I just want to speed up more
> > the scanning, what can i do?
> Another couple of things which might help are Timothy O'Malley's
> timeoutsocket module, and asyncore. The first keeps you from having to wait
> for sockets to time out normally, which you will often find on filtered
> ports. The second is the asyncore module, which lets you start lots of
> non-blocking requests without holding up the whole works.
> -- 
> http://mail.python.org/mailman/listinfo/python-list
`-> (tool_man)

Michael Gilfix
mgilfix at eecs.tufts.edu

For my gpg public key:

More information about the Python-list mailing list