Now we can reconnect to a JSVM\!
This commit is contained in:
commit
56c70c38b7
27 changed files with 381 additions and 40 deletions
|
@ -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)
|
||||
|
|
Reference in a new issue