Higher Buffer size and proper reading

md5sum a.out
a191f1a77a0e940f93d80ee580b5586a  a.out

Increased network buffer size and made the read call nonblocking and
reading all the bytes from the incoming request.