Socket Programming Question

Jonathan Giddy jon at dgs.monash.edu.au
Fri Apr 7 01:35:40 EDT 2000


>def main_server_thread():
>        while 1:
>                (clientsocket, address) = serversocket.accept()
>                ct = Thread(target=client_thread,args=((clientsocket),))
>                ct.run()

You need to call ct.start(), not ct.run().  The start method creates the
new thread to execute the run method..

Jon.




More information about the Python-list mailing list