Skip to content

Disabling auto pong in the client #448

@gionapaolini

Description

@gionapaolini

I am using the tungstenite client in some integration tests and I wish to test the case in which the client stop responding to pings.
Quoting the documentation:

..For example, upon receiving ping messages tungstenite queues pong replies automatically. The next call to read, write or flush will write & flush the pong reply. This means you should not respond to ping frames manually... ...Note that if read returns a ping, you should flush before passing a custom pong to write, otherwise the automatic queued response to the ping will not be sent as it will be replaced by your custom pong message.

It seems I might be able to overwrite the pong if I do not flush, but is there a way to disable this auto-pong behavior altogether? If not, would it be welcomed as a new feature?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions