Multithreading support for *win32* BaseHTTPServer

Bill Tutt billtut at microsoft.com
Wed Aug 29 02:14:39 EDT 2001


Actually, you can checkout the source code to edna (a simple MP3
streaming web server) to find a nice sample implmentation of a
multithreaded HTTP server, and a Win32 service.

You can find edna at: http://edna.sourceforge.net/

Bill

-----Original Message-----
From: Gerson Kurz [mailto:gerson.kurz at t-online.de] 
Sent: Tuesday, August 28, 2001 10:04 PM
To: python-list at python.org
Subject: Re: Multithreading support for *win32* BaseHTTPServer


On Tue, 28 Aug 2001 08:03:53 -0400 (EDT), "Scherer, Bill"
<Bill.Scherer at VerizonWireless.com> wrote:

>
>Try the following:
> [Source Snipped]

Neither your example nor the ones posted by the other folks seems to
work on Win32 (more specifically: ActivePython 2.1.0.210, Windows 2000
SP2) I get this for your example:

D:\Python21\Lib>testmtserver.py
serving on port 9999
Exception in thread Thread-1:
Traceback (most recent call last):
  File "D:\Python21\Lib\threading.py", line 378, in __bootstrap
    self.run()
  File "D:\Python21\Lib\threading.py", line 366, in run
    apply(self.__target, self.__args, self.__kwargs)
  File "D:\Python21\Lib\SocketServer.py", line 246, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "D:\Python21\Lib\SocketServer.py", line 495, in __init__
    self.handle()
  File "D:\Python21\Lib\BaseHTTPServer.py", line 258, in handle
    self.raw_requestline = self.rfile.readline()
  File "D:\Python21\Lib\socket.py", line 233, in readline
    new = self._sock.recv(self._rbufsize)
AttributeError: 'int' object has no attribute 'recv'

and a similar error message for the other two examples :( 

-- 
http://mail.python.org/mailman/listinfo/python-list




More information about the Python-list mailing list