5 ms·
> If you aren't exposing things like source ip, listen queue depth, buffer sizes, errno from failures, etc...you are potentially limiting how well it works. Th
by sigil 9y ago
> If you aren't exposing things like source ip, listen queue depth, buffer sizes, errno from failures, etc...you are potentially limiting how well it works.
This is a good point.
> Plus the read/write overhead.
The author's code uses OpenBSD's `SO_SPLICE` for zero-copy socket data transfers.
http://man.openbsd.org/OpenBSD-5.4/setsockopt.2 http://man.openbsd.org/OpenBSD-5.4/setsockopt.2
Edit: apparently `SO_SPLICE` can't splice IP sockets onto unix domain sockets yet, so the presented code is kind of wishful thinking. It sounds like this is in the works though.