Now we can reconnect to a JSVM\!

This commit is contained in:
Jonatan Pålsson 2011-02-14 19:47:28 +01:00
commit 56c70c38b7
27 changed files with 381 additions and 40 deletions

View file

@ -29,9 +29,9 @@ s.send(
"Token: %s\n\
Server-Command: define\n\
Content-Type: text\n\
Content-Length: 42\n\
Content-Length: 49\n\
\n\
function myFun() {return 'Hello world!' ;}" % token)
function myFun() {return 'Hello World!' ;}" % token)
fs = s.makefile()
data = fs.readline()
print "Token:", token
@ -54,6 +54,8 @@ print "Data: ", ' '.join(data.split(" ")[1:])
s.close()
time.sleep(2)
HOST = 'localhost' # The remote host
PORT = int(sys.argv[1]) # The same port as used by the server
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)