Added new python test file, and made __echo respond with users JSVM
This commit is contained in:
parent
2c083dd3dd
commit
30cebd1c0d
6 changed files with 64 additions and 14853 deletions
22
python_client
Executable file
22
python_client
Executable file
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
|
||||
import socket
|
||||
|
||||
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)
|
||||
s.connect((HOST, PORT))
|
||||
s.send('__hello 0')
|
||||
fs = s.makefile()
|
||||
data = fs.readline()
|
||||
token = data.split(" ")[0]
|
||||
print "Token:", token
|
||||
|
||||
s.send(token+" __echo 0 msg")
|
||||
data = s.recv(1024)
|
||||
print data
|
||||
|
||||
s.close()
|
||||
|
Reference in a new issue