Giter Site home page Giter Site logo

Comments (8)

bsergean avatar bsergean commented on May 14, 2024 1

from ixwebsocket.

bsergean avatar bsergean commented on May 14, 2024

I'll take a look when I have time but if you have an idea for a fix please go ahead :)

from ixwebsocket.

bsergean avatar bsergean commented on May 14, 2024

ps: I should say that I am not positive that it is a regression, but it is still a bug.

from ixwebsocket.

AlexandreK38 avatar AlexandreK38 commented on May 14, 2024

I had a look and created a PR to fix this, but in fact this was nothing to do with the 935e679

  • First, when we receive the close code / reason remotely, the reason had 2 characters more than it needed (that why we could see "ac" or "%" or whatever randomnly read from memory)
  • Second, when we used the close() method, we sent the code but not the reason, so we can't expect to read it on the other side
  • Not directly linked, but we can call the _onCloseCallback(_closeCode, _closeReason, _closeWireSize); with not really initialized value (0, "", 0) in the case we call setReadyState(CLOSED) outside the close() method

All of this should be fixed in PR #34

from ixwebsocket.

AlexandreK38 avatar AlexandreK38 commented on May 14, 2024

So is the issue fixed as you wanted with last PR?

from ixwebsocket.

bsergean avatar bsergean commented on May 14, 2024

make ws_test seems to behave now !

from ixwebsocket.

bsergean avatar bsergean commented on May 14, 2024

I think that the next step here is to add the ability to specify a reason and a code when calling websocket.close, but that might be very easy.

from ixwebsocket.

AlexandreK38 avatar AlexandreK38 commented on May 14, 2024

Just 2 parameters to add; you can if you want to :)

from ixwebsocket.

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.