socket: shutdown(2) and read until EOF