problem on socket programming
malc0de.encrypt at gmail.com
Fri Jul 31 09:25:09 CEST 2009
hello there, I'm using Learning Python 3rd edition as my core
reference, the book is great.
here's some snippet for demonstrating echo-server program, but I can't
interpret it in both windows / Gnu linux ...
from socket import *
myHost = ''
myPort = 50007
sockobj = socket(AF_INET,SOCK_STREAM)
while true :
connection,address = sockobj.accept()
print 'server connected by :',address
data = connection.recv(1024)
if not data: break
connection.send('echo : '+ data)
where's the problem,
beforehand appreciate ...
More information about the Python-list