make http_read_sock and friends use new socket API