Tech Note: TCP Data Acquisition and Event Logging
PRODUCT: 4D | VERSION: 20 R8 | PLATFORM: Mac & Win
Published On: May 30, 2025

This technical note explores the implementation of TCP data acquisition and event logging using 4D's newly introduced classes, TCPConnection and TCPEvent. The TCPConnection class provides a modern, asynchronous approach to managing TCP client connections, enabling seamless data exchange with external servers or devices. The TCPEvent class complements this by handling connection lifecycle events, such as connection establishment, data reception, and errors, allowing for robust event-driven programming. Through practical examples and detailed explanations, this note demonstrates how to leverage these classes to acquire data over TCP/IP networks and log critical events for monitoring and debugging. By integrating these features, developers can enhance the connectivity and functionality of their 4D applications, enabling real-time data acquisition and comprehensive event logging.
Download Complete Tech Note: Tech Note Document
Commented by Jean-Remi Dunand on October 1, 2025 at 6:15 AM
The demo uses 4D Internet Command and not the new classes. Is it possible to put the version using classes ? Thanks