Login Register


Need help with a script filter_list
Author
Message
Need help with a script #1
Hello!
I have been sitting on a script for a multi-thread server for a while.
I have no idea how to change the bold bit of code, co it will work.
The script is taken from a tutorial, bu the tutorial was not completely working.
The highlighted part is the one that does not work. Server starts up normally, but when I try connecting, it does not work Sad
Any ideas what I should do?
I know that the client_thread is not defined anywhere, but I have no idea what to put instead. I am on Python 3.2
Code:
import socket import threading import _thread print('Starting server...') print('Setting up details...') HOST = 'localhost' PORT = 8050 BUFSIZ = 1024 ADDR = (HOST, PORT) print('Setting up listener...') serversock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) serversock.bind(ADDR) serversock.listen(2) while 1: print('Done! Waiting for connections...') clientsocket = serversock.accept() print('Connected from', clientsocket) [u][b] ct = client_thread(clientsocket)[/b][/u] ct.run() print('Closing Thread') serversock.close()

Any help would be appreciated. Thank you

Reply





Messages In This Thread
Need help with a script - by TechSaavy - 12-11-2012, 05:59 PM
RE: Need help with a script - by 3SidedSquare - 12-18-2012, 03:52 AM
RE: Need help with a script - by TechSaavy - 12-18-2012, 03:39 PM
RE: Need help with a script - by 3SidedSquare - 12-18-2012, 11:21 PM
RE: Need help with a script - by TechSaavy - 12-19-2012, 04:27 PM



Users browsing this thread: 1 Guest(s)