Skip to content

How to use "ws.once" with this library? #121

Closed
@regisfaria

Description

@regisfaria

Hello!

I adopted this package when I was needing to have my WS connections restarted if they disconnect. It worked perfectly in my case, since I was using this to follow up crypto-currencies value changes.

Now I wish to also have a channel open, using this package, but I lack one functionality that my code needs, which is the method: ".once("message",() => {})". I use this to send crypto orders and get their respective message right after.

Anyone have ideas on how to achieve that?

I need to follow one pipeline of: send data to ws server -> get the message and send new data -> get message and send -> ... and so on until I achieve the end(I usually do this around 4 times), which is a variable full of specific data for my app.

Searching through the "reconnecting-websocket" lib I found no "once" method.

I really appreciate if anyone can help me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions