Skip to content
This repository was archived by the owner on Sep 25, 2023. It is now read-only.
This repository was archived by the owner on Sep 25, 2023. It is now read-only.

Mocking server returning close frames #54

@TTransmit

Description

@TTransmit

I have an issue with my WebSocket setup that the client Android app occasionally doesn't respond to a ping of the PingFrame fast enough with a pong. This causes the web socket server to return a close frame. This is fine except that there is a bug in the reconnection logic of my app that means it occasionally doesn't reconnect. I want to be able to replicate the bug caused by the close frames being received reliably.

OkHTTP has SocketPolicy. Is there a recommended way to use SocketPolicy with MockWebServer? I've been struggling to understand how to implement SocketPolicy with either OkHTTP's MockWebServer or fabric8io's MockWebServer.

Another very nice solution would be if I could send a close frame in response to a certain message or after a certain time. e.g. .andEmit(CloseFrame())

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