Skip to content

Type hint for websocket connection #1399

@paulmis

Description

@paulmis

What is the type hint for a websocket connection, i.e. from the example:

async def echo(websocket: ?):
    async for message in websocket:
        await websocket.send(message)

async def main():
    async with serve(echo, "localhost", 8765):
        await asyncio.Future()  # run forever

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions