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

Connect server response to request #138

Open
ttmms opened this issue Apr 20, 2021 · 0 comments
Open

Connect server response to request #138

ttmms opened this issue Apr 20, 2021 · 0 comments

Comments

@ttmms
Copy link

ttmms commented Apr 20, 2021

When I have a listener like this.$options.sockets.onmessage = (data) => console.log(data), it triggers on any message from server. How do I know which response is from which request?

Is there some way to have request in a form like this.$socket.send('some data').then(response=> handleResponse(response)) so there would be a connection between specific request and its response?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant