Don't die on connection timeout.
Don't use buffering.
Keep time more strictly.
Remove unused subs.
Don't use code=0 which is reserved by riak PBC API.
Check length of bytes more strictly.
Check timeout more strictly.
Reconnect if the old socket was disconnected.
Revert some changes in 6b678d9
Ignore EINTR and retry to call system call.