Git Product home page Git Product logo

pywnp's People

Contributors

darkcoder28 avatar keifufu avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

pywnp's Issues

Error when trying to bind socket to localhost rather than the loopback IP

I'm having an issue using this project on Linux.
Whenever I try and run the Initialize function, I get the following error:
OSError: [Errno 99] error while attempting to bind on address ('172.0.0.1', 3333): cannot assign requested address

I believe that I have found the issue which is that when you call WNPRedux._server = serve(WNPRedux._onConnect, 'localhost', port) on line 147 of pywnp.py, you are trying to bind to localhost and not the loopback IP 127.0.0.1 which has been known to cause issues on devices with IPv6 disabled/unavailable (See WebSockets: Read the Docs - FAQ)

The easiest way to fix this would be to change localhost to to 127.0.0.1, but another parameter could be added to an overloaded version of the Initialize function to make it more configurable and avert issues if the user isn't using 127.0.0.1 as their loopback for whatever reason or allow the use of localhost in IPv6 environments.

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.