GithubHelp home page GithubHelp logo

pws's People

Contributors

jokero avatar porsager avatar trasherdk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pws's Issues

v4.0.6 published on npm, repository is still v4.0.5

I noticed there was a new release in npm, v4.0.6, but when i came to the repository to see the changes i didn't see them and saw the package.json is still 4.0.5, any reason for not updating the repository?

Options aren't passed unless you pass a string to protocol

So i found this module which is exactly what i need, but it looks like the ws options won't be passed correctly unless you pass a parameter for protocol, i found out this while testing, i kept getting "401" when trying to connect and after that, i decided to check the headers of the request, the "authentication" header was missing, until i added a empty and not empty string as the second parameter (protocol) and the header was included in the request.

request that didn't work:

const ws = Pws("ws://localhost:9090", Websocket, {
    headers: {
        authentication: "test"
    }
});

request that worked:

const ws = Pws("ws://localhost:9090", "", Websocket, {
    headers: {
        authentication: "test"
    }
});

Add ability to use ws options

The exposed interface does not allow to use ws options so it is not possible, for example, to disable CPU intensive extensions like permessage-deflate.

pingTimeout option crashes

I am using the pingTimeout option and when the server does not send a message in a while, just as pws is about to close the connection, it crashes with β€œCannot assign to read only property 'code' of object '#'”

image

image

Chrome 73.0.3683.103, but MDN agrees that the property is read-only.

persistent websocket not persisting with pingTimeout set

According to the documentation on the readme of this repo,

To prevent this state PWS let's you set a specific timeout after which to force a reconnection if you did not receive any messages from the server.

However, what I observe is that if I set pingTimeout, the socket connection closes after that amount of time and does not re-connect.

Maximum retry option not working

I set the "maxRetries" option to N. But after reaching maximum retry it keeps retrying. I found the bug in the code.

I think this line is the issue -

pws/umd/pws.js

Line 207 in 9a1e11c

if (pws.maxRetries && pws.connects >= pws.maxRetries)

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.