Improved socket read