2 ms·
From client perspective, socket I/O is isomorphic to the file I/O - you get a file descriptor and you read/recv and write/send to it. The only difference is how
by bheadmaster 2y ago
From client perspective, socket I/O is isomorphic to the file I/O - you get a file descriptor and you read/recv and write/send to it. The only difference is how servers handle it.
The ioctl() is different, mostly because it's used to share memory between kernel and userspace, but the same communication pattern could be implemented in file I/O too, probably with performance penalty. Just send the serialized structures, and receive them back.
But the goal of DBus was never performance, it was to provide a unified interface to global system services. File I/O here seems like an obvious choice - it's the most fundamental interface that almost every program in the world supports.