Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> This patch attempts to implement the idea, with safety in case the
> packet is not immediately available.
Seems like you ought to be testing for failure returns from send() and
recv(). Also, what of EINTR from select()?
regards, tom lane