问题
Does anyone know the buffering characteristics of Unix sockets when sending small chunks of data(a few bytes)?, when 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.
Thanks.
回答1:
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.
来源:https://stackoverflow.com/questions/12010033/buffering-characteristics-of-unix-sockets