Use `Socket#read` rather than `Socket#recv`.

`Socket#recv` only has to provide up to max_len bytes. For large
message sizes it is possible to receive an incomplete message. Using
`#read` instead of `#recv` guarantees you will get that requested
amount of bytes.