added function to test callErlang() in js

This commit is contained in:
Jeena Paradies 2011-02-06 19:17:08 +01:00
parent fcc114a087
commit 6166a109fc
4 changed files with 7 additions and 4 deletions

View file

@ -29,9 +29,9 @@ s.send(
"Token: %s\n\
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 callErlang('a', 'b') ;}" % token)
fs = s.makefile()
data = fs.readline()
print "Token:", token
@ -54,6 +54,7 @@ print "Data: ", ' '.join(data.split(" ")[1:])
s.close()
"""
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)
@ -74,3 +75,4 @@ print "Token:", token
print "Data: ", ' '.join(data.split(" ")[1:])
s.close()
"""