GithubHelp home page GithubHelp logo

server response for open about jawampa HOT 6 CLOSED

dmtrlbdv1 avatar dmtrlbdv1 commented on August 24, 2024
server response for open

from jawampa.

Comments (6)

dmtrlbdv1 avatar dmtrlbdv1 commented on August 24, 2024

I mean how to receive session id ?

from jawampa.

Matthias247 avatar Matthias247 commented on August 24, 2024

There currently isn't a method.
It would be easy to introduce a getter for the sessionId, but I didn't did that because it introduces a race condition in combination with the auto-reconnect feature. When you get a notification delivered that that you got connected this event might already be in the past, so when reacting to it you might already be disconnected or reconnected again and the sessionId you would retrieve with a getter might not match the sessionId that caused the connected event.

It think the most correct way at the moment (without dropping the auto-reconnect functionality) would be to deliver the sessionId with the statusChanged observable.

from jawampa.

dmtrlbdv1 avatar dmtrlbdv1 commented on August 24, 2024

statusChanged with sessionId will be very helpful. Right now it is a blocker for us to use this library without knowing sessionId (it is necessary to know this value in our case. I think it is important not only for us)

from jawampa.

Matthias247 avatar Matthias247 commented on August 24, 2024

Do the changes in cc0b993 help you?
Changing the status to an interface with various implementations depending on the state is the best I could think of. This means the reason for disconnects could now also be transmitted in the Disconnect events.

This might not be the complete implementation, I have to look at it again on another day.

from jawampa.

dmtrlbdv1 avatar dmtrlbdv1 commented on August 24, 2024

Thank you! Seems like what we need! I hope this feature will be released to maven soon.

from jawampa.

Matthias247 avatar Matthias247 commented on August 24, 2024

I reworked it a little bit and have realesed it now. Hope it helps you!
For all others: Sorry for breaking the API. However the necessary adaptions in the connection handlers can be done quite quickly.

from jawampa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.