Example application demonstrating the TCP server API of the WiConnect Host Library

Dependencies:   WiConnect mbed

Revision:
0:19d3a6600a5a
diff -r 000000000000 -r 19d3a6600a5a tcp_client.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tcp_client.py	Tue Aug 26 23:07:17 2014 +0000
@@ -0,0 +1,12 @@
+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()