Page 1 of 1

TCP Socket Component for Flowcode, Embedded and PC-App

Posted: Tue Jul 28, 2026 1:36 pm
by stefan.erni
Hello everyone,

I would like to propose a new Flowcode component: TCP Sockets (Client and Server), Embedded and PC-App (Web-App?)

With the increasing use of Wi-Fi-enabled microcontrollers such as the ESP32, many projects require reliable communication between embedded devices and PCs over a local network.
At the moment, there does not appear to be a simple and user-friendly TCP socket component available in Flowcode.

Example Application
1 PC acting as a TCP server
20 ESP32 devices acting as TCP clients
Each ESP32 sends approximately 100 kB of measurement data once per hour
The PC collects, stores, and processes the data

TCP is an ideal solution for this type of application because it provides reliable, ordered data transmission without packet loss.

Suggested Features
TCP Client
Connect(IP Address, Port)
Disconnect()
SendData()
ReceiveData()
ConnectionStatus()
TCP Server
StartServer(Port)
StopServer()
AcceptClient()
SendData()
ReceiveData()
ClientCount()

For SendData and ReceiveData I would only specify those three.
2026-07-28_14-27-05.PNG
2026-07-28_14-27-05.PNG (8.66 KiB) Viewed 54 times
Sending and receiving via UART and Bluetooth in this way can be maintained.
2026-07-28_14-28-36.PNG
2026-07-28_14-28-36.PNG (21.08 KiB) Viewed 54 times
Benefits for Flowcode Users
Easy integration of ESP32 projects into existing networks
Communication with PCs, industrial PCs, Raspberry Pi systems and
Simplified development of IoT and Industry 4.0 applications
No need to create custom C code or external networking libraries
Support for multi-device data collection and monitoring systems

Additional Use Case
Communication Between Two Flowcode Applications
Another valuable use case would be communication between two Flowcode applications running on separate computers.

Example:
Flowcode Application A running on PC 1
Flowcode Application B running on PC 2
Communication over Ethernet, Wi-Fi, or a local network using TCP sockets

Possible applications include:

It could also be a great help for this post.
So Obvious.......
https://flowcode.co.uk/forums/viewtopic.php?t=3756

Data exchange between two Flowcode-based systems
Remote monitoring and control
Communication between operator and machine interfaces
Testing and simulation environments

Re: TCP Socket Component for Flowcode, Embedded and PC-App

Posted: Tue Jul 28, 2026 5:40 pm
by chipfryer27
Hi Stefan

What's wrong with the Network Comms component? I use it to create a link to whatever / wherever is hosting my service etc and will be used in the "So Obvious" post. Well unless something better comes along :)

Regards

Re: TCP Socket Component for Flowcode, Embedded and PC-App

Posted: Wed Jul 29, 2026 10:32 am
by stefan.erni
Hi Lian

Thanks for the information.
I assume you mean the MQTT client. Yes, it's practical and convenient for measurement data and is also very well documented.
You can install your own local broker or use one from the internet.

https://www.flowcode.co.uk/resources/da ... xample.pdf

The disadvantage is that you need a broker and that a data array is not transferred as efficiently.
"Limited data format support: JSON is available, but BSON is not supported."

With the TCP Sockets:

Should it be possible to handle small data arrays like data[30] as well as large ones like data[12000] of integers.
Very fast if both programs are on the same computer or on the same network.
No broker needed.
Of course, I have no idea how complicated that is. :)

Re: TCP Socket Component for Flowcode, Embedded and PC-App

Posted: Wed Jul 29, 2026 2:31 pm
by chipfryer27
Hi Stefan

No, I meant creating a link using the Network Comms component.

Using it I can connect to my server / whatever and transfer.

Regards