diff options
| author | bernard <[email protected]> | 2017-09-29 10:23:56 +0800 |
|---|---|---|
| committer | bernard <[email protected]> | 2017-09-29 10:23:56 +0800 |
| commit | cccff34fcac04f34233a33e453f2d0ec255bf231 (patch) | |
| tree | d406036f73296b27f3cb96e77ede98dd7803c61d /examples/network/tcp_client.py | |
| parent | e9a77b513f0a4b37d539a030592a61b08d03602d (diff) | |
| parent | 3691b67e83ab57196dfc62606b1be18db76994a7 (diff) | |
Merge branch 'master' of https://github.com/RT-Thread/rt-thread
Diffstat (limited to 'examples/network/tcp_client.py')
| -rw-r--r-- | examples/network/tcp_client.py | 16 |
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 |
