Python Library TCP Socket
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

tcp_socket__tcp_client.py 308B

12345678910111213141516
  1. import sys
  2. sys.path.append('../..')
  3. import report
  4. import tcp_socket
  5. import time
  6. def mirror_callback(data):
  7. return data
  8. report.stdoutLoggingConfigure(log_name_lvl=[('root', 'DEBUG'), ])
  9. c = tcp_socket.tcp_client('127.0.0.1', 17000)
  10. c.send(b'abc')
  11. print('The Client received: %s' % repr(c.receive()))