ACKme
/
wiconnect-tcp_server_example
Example application demonstrating the TCP server API of the WiConnect Host Library
tcp_client.py
- Committer:
- dan_ackme
- Date:
- 2014-11-27
- Revision:
- 5:1c7bb44de59f
- Parent:
- 0:19d3a6600a5a
File content as of revision 5:1c7bb44de59f:
import socket ECHO_SERVER_ADDRESS = "192.168.1.52" ECHO_PORT = 7 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((ECHO_SERVER_ADDRESS, ECHO_PORT)) s.sendall('Hello, world') data = s.recv(1024) print 'Received', repr(data) s.close()