Socket issues

twistedduck9 the.one.duckenator at googlemail.com
Sat Jan 17 16:11:33 EST 2009


My hosting provider (Streamline) have said that there is no firewall
(it's a dedicated server). Either way the code I'm using is:

Listening socket:
import socket
mysock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
mysock.bind (('79.99.43.58', 2727))
mysock.listen(1)
while True:
   channel, details = mysock.accept()
   print channel.recv(100)
   channel.send ('Got a message.')
   channel.close()

Sending socket:
import socket
mysock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
mysock.connect(('79.99.43.58', 2727))
mysock.send('test');
mysock.close()

Thanks for the response!



More information about the Python-list mailing list