TCP client write string

 1'''
 2TCP_client - TCP_client_write_string.py.
 3
 4This example demonstrates how to write string to server
 5
 6For other examples please check:
 7    https://github.com/WPC-Systems-Ltd/WPC_Stand-alone_Python_release/tree/main/examples
 8
 9Copyright (c) 2024 WPC Systems Ltd.
10All rights reserved.
11'''
12
13## WPC
14import pywpc
15
16## Paremeters setting
17host_ip = "192.168.5.108"   ## The server's hostname or IP address
18port = 3333                 ## The port used by the server
19
20## First you should open tcp server
21
22## Open TCP client
23pywpc.TCPClient_open(host_ip, port)
24
25## Write string to server
26pywpc.TCPClient_writeString("Hello world")
27pywpc.TCPClient_writeString("WPC Systems Ltd.")
28pywpc.TCPClient_writeString("Good day")
29
30## Close TCP client
31pywpc.TCPClient_close()