tcp_client.py 372 B

12345678910111213141516
  1. #
  2. # Copyright (c) 2006-2019, RT-Thread Development Team
  3. #
  4. # SPDX-License-Identifier: MIT License
  5. #
  6. # Change Logs:
  7. # Date Author Notes
  8. # 2019-06-13 SummerGift first version
  9. #
  10. import usocket
  11. client = usocket.socket(usocket.AF_INET, usocket.SOCK_STREAM)
  12. client.connect(("192.168.10.110", 6000))
  13. client.send("rt-thread micropython!")
  14. client.close()