import socket | |
import time | |
import json | |
from ipc import VlanIpc | |
host = 'localhost' # The remote host | |
port = 3080 # The same port as used by the server | |
s = VlanIpc() | |
s.client_connect(host, port) | |
msg = {"group": "group1", "client_name": "client1", "request": "lava_sync", "message": "bye bye world"} | |
print "Sending to server:" | |
print msg | |
s.client_send(msg) | |
ret = s.client_recv_and_close() | |
print "Server said in reply: " | |
print ret | |