summaryrefslogtreecommitdiff
path: root/examples/network/tcp_client.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/network/tcp_client.py')
-rw-r--r--examples/network/tcp_client.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/examples/network/tcp_client.py b/examples/network/tcp_client.py
new file mode 100644
index 0000000000..d8ae125fdb
--- /dev/null
+++ b/examples/network/tcp_client.py
@@ -0,0 +1,16 @@
+# -*- coding: utf-8 -*-
+
+import socket
+
+s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
+
+s.connect(('192.168.10.110',6001))
+
+print s.recv(1024)
+
+for data in ['rtt_nano','rtt_thread','rtt_bsp']:
+ s.send(data)
+ print s.recv(1024)
+
+s.send('exit')
+s.close() \ No newline at end of file