Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extensible websocket events #8

Open
eliihen opened this issue Apr 5, 2018 · 0 comments
Open

Extensible websocket events #8

eliihen opened this issue Apr 5, 2018 · 0 comments
Labels
core Related to the core library enhancement New feature or request

Comments

@eliihen
Copy link
Member

eliihen commented Apr 5, 2018

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);
@eliihen eliihen added enhancement New feature or request core Related to the core library labels Apr 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Related to the core library enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant