February 22nd, 2005, 11:10 AM
Join Date: Mar 2004
Time spent in forums: 5 h 5 m 20 sec
Reputation Power: 10
sockets & address already in use error
Fairly new to Python - got a module running a server on a designated port on the localhost. However, when I stop the server and try to run it again I get the following error:
socket.error: (98, 'Address already in use')
Unless, I choose a different port the error does not go away. My code is:
ip = 'localhost'
port = 3458
mySocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
channel,details = mySocket.accept()
print 'Connection established with', details
channel.send('Connection established to server\n')
channel.send('Logging please wait...\n')
Any ideas please?