Gearoid Murphy
Gearoid Murphy

Reputation: 12126

Buffering characteristics of Unix Sockets

Does anyone know the buffering characteristics of Unix sockets when sending small chunks of data (a few bytes)?

When I am using TCP sockets, I can disable the Nagle algorithm to prevent latency in data transit. But there's no equivalent functionality (that I know of) for Unix Domain sockets.

Upvotes: 4

Views: 2671

Answers (1)

nos
nos

Reputation: 229304

There is no nagle algorithm available on unix domain sockets.

Unix sockets are normally implemented as a memory buffer in the operating system kernel. Once you've written/sent data on the socket, it is copied into that buffer, and becomes immediately available to the peer.

Upvotes: 4

Related Questions