Receive fixed number of bytes from socket synchronously
Merge bug 25502