Use resource read method for sockets