Skip to content

Handling WebSocketClient's WS_OPCODE_CLOSE code #553

Open

Description

@neeeruuu

So sorry if there already is a way to do this, I couldn't find this one.

The onclose callback currently passes no arguments, could it be made so that it passes the error code sent by the server when the connection is closed (or 0/-1 for cases where the server didn't pass one or connection was closed locally)? Or have it written to hio's error.

Activity

  1. ithewei commented on May 22, 2024

    @ithewei
    Owner

    The ws CLOSE frame is not parsed, and no error code is exposed. If you need it, you have to modify the source code yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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