add eof() for AsyncStream. not 100% sure it is right.