Correctly detect end-of-file for a socket

Apparently it's not safe to mix `recvfrom` (system calls) and
buffer methods (`eof?`). I found a couple mentions of this, but
when I tried using this in Sanford, I ran into issues with an
error message like:

`"recv for buffered io"`

It seems the only proper way to detect end-of-file for a socket
and `recvfrom` is to see if it returns a response of 0 bytes. This
produces the same result of the previous, but additionally works
as expected in Sanford.