Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » U++ community news and announcements » Unix Domain Sockets Support Added to U++.
Unix Domain Sockets Support Added to U++. [message #61889] Sat, 06 December 2025 14:11 Go to next message
Oblivion is currently offline  Oblivion
Messages: 1248
Registered: August 2007
Senior Contributor
Hi,

Unix Domain Sockets Support Added to U++.

The socket API (renamed to Upp::Socket) now fully supports Unix domain sockets on POSIX systems, including both filesystem-based sockets and (on Linux) abstract namespace sockets.

New methods:

- ConnectFileSystem / ListenFileSystem: POSIX-wide, bind/connect using a regular filesystem path.
- ConnectAbstract / ListenAbstract:     Linux-only, using the abstract namespace (no filesystem entry).


This should make local IPC faster, cleaner, and more flexible across platforms. Feedback and testing are welcome!


Best regards,
Oblivion


Re: Unix Domain Sockets Support Added to U++. [message #61900 is a reply to message #61889] Sat, 13 December 2025 15:50 Go to previous messageGo to next message
Tom1
Messages: 1317
Registered: March 2007
Ultimate Contributor
Hi İsmail,

Thanks for the news! I was pleased to read about this interesting and important piece of work. As I currently do not have much time to dig into your implementation properly, can you tell me if you included support for Windows 10/11 too? Windows is supposed to support AF_UNIX since about 2017... although not abstract socket namespace.

Do you have any Client/Server sample code that demonstrates and possibly benchmarks the IPC between them? It would be interesting to see how localhost loopback (AF_INET) compares with this.

Best regards,

Tom

Re: Unix Domain Sockets Support Added to U++. [message #61901 is a reply to message #61900] Sat, 13 December 2025 17:56 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1248
Registered: August 2007
Senior Contributor
Hello Tom,

Quote:

Thanks for the news! I was pleased to read about this interesting and important piece of work. As I currently do not have much time to dig into your implementation properly, can you tell me if you included support for Windows 10/11 too? Windows is supposed to support AF_UNIX since about 2017... although not abstract socket namespace.

I actually wasn't aware of that until you mentioned it Smile
I've been working almost exclusively on Linux for years, so I must have missed that development.

That said, since the Socket class already abstracts things in a fairly portable way, and only connection creation and listening need to be handled separately, it should be quite straightforward to add Windows support as well. At the moment, it is available only on POSIX systems

I'll check and verify this as soon as possible.

Regarding performance, I didn't include any dedicated benchmarks. The U++ nightlies already contain UnixSocketClient and UnixSocketServer examples, which are essentially the same as the SocketClient and SocketServer examples. Based on my experience (outside of U++), Unix domain sockets are generally faster for local IPC, as they avoid the TCP/IP stack overhead.

Moreover, performance was not the only motivation. Many system services (such as the notorious D-Bus) rely exclusively on Unix domain sockets.

In any case, I'll follow up with some benchmarks.

Best regards,
İsmail


Re: Unix Domain Sockets Support Added to U++. [message #61902 is a reply to message #61889] Sat, 13 December 2025 20:27 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1248
Registered: August 2007
Senior Contributor
A simple test, and good news: It works on Windows too (with a couple of minor modifications on the impl.). Smile

I'll have it ready ASAP and then open a PR...

Best regards,
İsmail


Re: Unix Domain Sockets Support Added to U++. [message #61903 is a reply to message #61902] Sat, 13 December 2025 20:43 Go to previous messageGo to next message
Tom1
Messages: 1317
Registered: March 2007
Ultimate Contributor
Oblivion wrote on Sat, 13 December 2025 21:27
A simple test, and good news: It works on Windows too (with a couple of minor modifications on the impl.). Smile

I'll have it ready ASAP and then open a PR...

Best regards,
İsmail

Excellent, well done! Smile

I had a little chat with copilot and it confirmed (or rather suggested) that AF_UNIX sockets should be as fast as named pipes on both systems, but have better security. Also, they should easily beat local host loopback sockets in performance.

Thanks and best regards,

Tom
Re: Unix Domain Sockets Support Added to U++. [message #61904 is a reply to message #61903] Sat, 13 December 2025 22:49 Go to previous message
Oblivion is currently offline  Oblivion
Messages: 1248
Registered: August 2007
Senior Contributor
Hi Tom,

I've opened a PR, you can check the code there when you have time.

Best regards,
İsmail


Previous Topic: GIT release tag naming convention has been changed
Goto Forum:
  


Current Time: Sun Dec 14 05:19:40 CET 2025

Total time taken to generate the page: 0.05679 seconds