Receive fixed number of bytes from socket synchronously
Merge bug 25502
stable to default