15 lines
447 B
Python
15 lines
447 B
Python
|
import sys
|
||
|
sys.path.append('../..')
|
||
|
|
||
|
import report
|
||
|
import socket_protocol
|
||
|
import tcp_socket
|
||
|
import time
|
||
|
|
||
|
|
||
|
report.stdoutLoggingConfigure(log_name_lvl=[('root', 'INFO'), ])
|
||
|
c = tcp_socket.tcp_client_stp('127.0.0.1', 17017)
|
||
|
sp = socket_protocol.pure_json_protocol(c, channel_name='example_client')
|
||
|
sp.send(socket_protocol.SID_READ_REQUEST, 0, None)
|
||
|
print('The Client received: %s' % repr(sp.receive(socket_protocol.SID_READ_RESPONSE, 0).get_data()))
|