setblocking in Win32
Mike Fletcher
mfletch at tpresence.com
Thu Jun 8 14:37:01 EDT 2000
Non-blocking ports most definitely work on win32 (almost everything I write
uses them). The EWOULDBLOCK (10035) error is thrown only when you're in
non-blocking mode (otherwise the call would just wait until it could accept
before returning). See asyncore.py for examples of how to work with
non-blocking sockets (mostly just catch the socket.error and see if the
first argument is 10035, if so, go about your other business, else re-raise
the error).
Congrats, you're non-blocking :) .
Mike
-----Original Message-----
From: jkingry at my-deja.com [mailto:jkingry at my-deja.com]
Sent: Thursday, June 08, 2000 1:57 PM
To: python-list at python.org
Subject: setblocking in Win32
Hi, I think I'm going to be told what I don't what to hear, but from
the error below, I think I have surmised that trying to set non-
blocking on a socket in a Win32 environment doesn't work.
Are there any work arounds?
Joe
Traceback (innermost last):
File "D:\Prog\Python\Lib\threading.py", line 376, in __bootstrap
self.run()
File "D:\Prog\Python\Lib\threading.py", line 364, in run
apply(self.__target, self.__args, self.__kwargs)
File "io.py", line 80, in run
sock,(address,port) = server.accept()
File "D:\Prog\Python\Lib\plat-win\socket.py", line 36, in accept
sock, addr = self._sock.accept()
error: (10035, 'winsock error')
Sent via Deja.com http://www.deja.com/
Before you buy.
--
http://www.python.org/mailman/listinfo/python-list
More information about the Python-list
mailing list