Steve McIntyre | b1cbad3 | 2014-12-12 21:40:25 +0000 | [diff] [blame] | 1 | import socket |
2 | import time | ||||
3 | import json | ||||
4 | from ipc import VlanIpc | ||||
5 | |||||
6 | host = 'localhost' # The remote host | ||||
7 | port = 3080 # The same port as used by the server | ||||
8 | |||||
9 | s = VlanIpc() | ||||
10 | s.client_connect(host, port) | ||||
11 | msg = {"group": "group1", "client_name": "client1", "request": "lava_sync", "message": "bye bye world"} | ||||
12 | print "Sending to server:" | ||||
13 | print msg | ||||
14 | s.client_send(msg) | ||||
15 | ret = s.client_recv_and_close() | ||||
16 | print "Server said in reply: " | ||||
17 | print ret | ||||
18 |