There's a quite big performance gain when using recvmmsg and sendmmsg family of functions where available (Linux >= 3.0 + glibc >= 2.14, FreeBSD >= 11.0). The code around socket handling might have to be refactored to gain a real benefit though.