refine the parsing tests and correctly handle missuse of nonblocking sockets