Skip to content

Setting to send ping in websocket connections #613

@saschnet

Description

@saschnet

I would like to migrate from uvicorn to granian but cannot find a feature for websocket connections.

In uvicorn there is the setting --ws-ping-interval with determines the interval the server creates a ping request and sends it to the connected client.

I cannot find an equivalent setting and see that connections are timing out when clients do not implement a ping pong mechanism on their own.

Ideally, the setting would work as in uvicorn. When set to None or 0, there is no ping initiated, otherwise the ping will be triggered in the interval as configured.

When implementing the feature, I guess it also makes sense to be able to config something like --ws-ping-timeout in uvicorn.

Keep up great work!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions