Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

asyncio.StreamReader.read does what exactly? #100226

Copy link
Copy link
Closed
@ygoe

Description

@ygoe
Issue body actions

Documentation

https://docs.python.org/3/library/asyncio-stream.html#asyncio.StreamReader.read

It remains unclear what exactly that method does. It will give me no more than n bytes from the stream. That's a pretty vague contract. Will it sit there until so many bytes are available? Or will it return each one separately? Will they be fragmented in some way? How long will it wait for more bytes to become available?

And what does "EOF" mean?! I know this from the old DOS days as "end of file" but it has two meanings (the byte \x1A inside a file, or the actual end of a file on disk) which I don't see apply here.

Similarly for the other read methods, will they wait and only return when so many bytes have been received? Are there any timeouts? What about cancellation? I'm not sure if I can expect the same level of features as in .NET, but at least I'd like to know what to expect.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Done
    Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.