With the release of 4D 21, we’re officially saying goodbye to the 4D Internet Commands plugin, a long-standing companion for many developers since the early days of the internet. But this isn’t just the end of an era. It’s the beginning of a more secure, more powerful, and more enjoyable way to handle internet communications in 4D.
You can still continue using 4D Internet Commands in version 20 with 4D 21. So, why make the switch? Because the new built-in classes are not just replacements, they’re a complete rethinking of how internet protocols should be handled in a modern development environment. They’re native, thread-safe, and designed to meet today’s standards in security, performance, and flexibility.
Why We Rebuilt from Scratch?
In the 90s, sending an email meant pushing plain text over a simple connection. Today, email is a battlefield of encryption, authentication, and formatting complexity. Trying to patch a 30-year-old plugin to meet these demands simply wasn’t sustainable. So we started fresh.
The result? A suite of native 4D classes that are secure, scalable, and designed for the modern internet. Whether you’re sending HTML emails with OAuth 2.0 authentication or building a TCP server with TLS encryption, you’re now equipped with tools that are robust, intuitive, and future-proof.
Email Handling – Our Biggest Leap Forward
Let’s start with the most common use case: email. This is where the 4D Internet Commands were most widely used, and where we’ve made the biggest improvements.
Previously, developers had to juggle multiple commands like SMTP_New, POP3_Login, or IMAP_Login, each with its own quirks and limitations. Error handling was minimal, and support for modern features like HTML content or OAuth was patchy at best.
Now, with classes like SMTPTransporter, POP3Transporter, IMAPTransporter, MailAttachment and 4D NetKit, you get:
- An asynchronous, thread-safe, object-oriented API that makes development faster and more enjoyable.
- Full support for HTML emails, attachments, and modern authentication.
- Simplified integration with POP3, IMAP, Gmail, and Microsoft 365.
- Improved error handling and debugging.
Want to get started? Here are some great resources:
TCP Communication – MODERN CODING for LEGACY PROTOCOL
The old TCP_Login and related commands got the job done, but they lacked flexibility and modern capabilities.
With 4D 21, you now have access to:
- TCPConnection for client-side communication.
- TCPListener and TCPEvent for building servers.
- Optional TLS encryption for secure data exchange.
These classes are event-driven and thread-safe, making them ideal for scalable, asynchronous applications. Whether you’re building a custom protocol or integrating with an existing service, the new TCP stack gives you the control and reliability you need.
👉 Dive deeper: TCP Communication Client-side & Server-side
UDP Communication – Simpler and Cleaner
For lightweight, connectionless communication, the new UDPSocket and UDPEvent classes replace the old UDP_New commands. They offer:
- A cleaner, more intuitive API.
- Event-based and thread-safe architecture.
- Better integration with the 4D language.
Perfect for real-time applications like IoT, gaming, or local network discovery.
👉 Learn more: UDP Communication
HTTP Requests – REST Made Easy
While HTTP wasn’t part of the Internet Commands plugin, many developers used it alongside. The new HTTPRequest and HTTPAgent classes are a major upgrade:
- Support for all HTTP methods (GET, POST, PUT, DELETE…).
- Custom headers, timeouts, and authentication.
- Built-in JSON parsing and response handling.
These classes make it easy to consume REST APIs or build integrations with third-party services.
👉 Start here: HTTP Client Part 1 & Part 2 – HTTP Agent
Still Using the Plugin?
We get it, refactoring takes time. That’s why:
- The 4D Internet Commands version 20 plugin remains compatible in 4D 21.
- The new classes are intuitive and well-documented.
- You’ll gain long-term benefits in performance, security, and maintainability.
Need Help Migrating?
Our 4D Professional Services team is here to help you modernize your application. Whether it’s a full migration or just a few key modules, we can guide you through the process and help you unlock the full potential of 4D 21.
Let’s build the future of 4D together, one class at a time.
Happy coding!
