Skip to content

Extensible websocket events #8

@eliihen

Description

@eliihen

Right now extensibility is extremely basic, basically only providing the same features as would be provided by the CLI options.

It may be a good idea to add extensibility of the websocket event handling to the core. This way it would be possible to use wurl as a library to implement handling WS extensions like socket.io.

See https://ws-rs.org/docs for the available events.

Some psuedo code:

let options = wurl::util::Options {
  on_message: |client: Client, msg: Message| -> Result<()> {
    // ... Do things
    Ok()
  }
};
wurl::network::connect(&options);

Metadata

Metadata

Assignees

No one assigned

    Labels

    coreRelated to the core libraryenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions