Giter Site home page Giter Site logo

Specify WebSocket port about supernet HOT 7 CLOSED

lukechilds avatar lukechilds commented on August 14, 2024
Specify WebSocket port

from supernet.

Comments (7)

lukechilds avatar lukechilds commented on August 14, 2024

Or if you can do the free port check internally so we know that:

{method: 'getendpoint'}

Will always work and return us an available port.

That would be ideal. But if that's too much work on your end we can do the check ourselves and pass it through.

from supernet.

jl777 avatar jl777 commented on August 14, 2024

good idea. if the port requested is inuse, you will get an error and have to use a different port.
I will add "port" field to getendpoint

from supernet.

jl777 avatar jl777 commented on August 14, 2024

pushed version with support for "port" field in getendpoint, it will use that to bind the endpoint.
only one such endpoint is supported, so the first getendpoint that succeeds will be the endpoint for that session. default is 5555

from supernet.

lukechilds avatar lukechilds commented on August 14, 2024

Sounds good, will test tomorrow.

from supernet.

lukechilds avatar lukechilds commented on August 14, 2024

This appears to have introduced a bug where mm always thinks the port is in use so I can no longer connect to the websocket:

$ curl 'http://127.0.0.1:49707/' --data-binary '{"queueid":0,"method":"getendpoint"}'
{"error":"Address already in use","err":-1,"socket":12}

$ curl 'http://127.0.0.1:49707/' --data-binary '{"queueid":0,"method":"getendpoint","port":5555}'
{"error":"Address already in use","err":-1,"socket":12}

$ curl 'http://127.0.0.1:49707/' --data-binary '{"queueid":0,"method":"getendpoint","port":1234}'
{"error":"Address already in use","err":-1,"socket":12}

Ports 5555 and 1234 are definitely free.

from supernet.

jl777 avatar jl777 commented on August 14, 2024

found bug, fixed

from supernet.

lukechilds avatar lukechilds commented on August 14, 2024

Resolved, thanks!

from supernet.

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.