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