redding/sanford-protocol — pull request #17 by jcredding (2013-02-04 20:56:39+00:00)
Title: Use `recv` instead of `recvfrom`

This changes our usage of `recvfrom` to `recv`. I previously
didn't realize that both existed and when I did I looked up
the difference. `recvfrom` is intended to be used with
`sendto` and they don't have to "connect" (call `connect` or
bind) before being run. You can give `sendto` a socket address to
send to. On the other end, `recvfrom` returns the data read and
the socket address it read it from. `recv` works with `send` and
is intended to be used with connected sockets. This is always the
case for our usage, so I think it's better to not mix them and
always use `send` and `recv`.