HelpWizard Pages Protocols TCP IP/en
Protocols - TCP/IP
Low level TCP/IP actions are found in the "Stream I/O" / "Socket Streams" folder of the standard library. Both TCP (connection oriented streams) and UDP (connectionless packets) are supported.
- TCP Client
Place a "TCP Socket [Connect]" action into the diagram. A socket stream will appear at the output, which can be passed on to any of the stream reading/writing actions (i.e. to read individual characters, lines, strings or binary bytes).
- TCP Server
Place a "TCP Socket [Wait for Connection]" action into the diagram. When someone connects to this port, a socket stream appears at the output pin.
When done with a socket, it should be closed with a "Stream [Close]" action. Otherwise, the port may remain used and possibly blocked.
The main menu contains a function to list open sockets and also to close them, in case you forgot to close it (under "Extras" → "Debugging" → "External Streams").
(click the right arrow to see an example)