socket: add next_close (un-tested)