KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Note: TCP Data Acquisition and Event Logging
PRODUCT: 4D | VERSION: 20 R8 | PLATFORM: Mac & Win
Published On: May 30, 2025
This technical article is restricted to partners Only. Login with your Partner account to have full access to this article!!!
Log In


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.