Giter Club home page Giter Club logo

Comments (3)

vi avatar vi commented on June 16, 2024

Specifying listeners on both parts is typically not a good idea. What do you want to do?

Some things that may help:

  1. Specifying -E option to terminate connections more aggressively;
  2. Using reuse-raw: overlay (or maybe reuse-broadcast:, depending on use case);
  3. Using autoreconnect: (especially with some form of connection reuser).

Command line that works reasonably for me:

websocat --text -E ws-l:127.0.0.1:5818 reuse-raw:autoreconnect:tcp-l:127.0.0.1:5819

Note that port 5819 only starts being listened after the first WebSocket clients gets connected.

from websocat.

masto avatar masto commented on June 16, 2024

Thanks very much for those overlays. I'd tried -E before with no luck, but using the options you suggested together seems to do the trick.

What I'm doing is, specifically, https://nabu.run (https://youtu.be/zabJhYvoI1k). It may not be a good idea to listen on both parts, but it is exactly what I need. Being able to do that with websocat makes my application possible, and saves me having to write my own proxy.

The situation I was trying to avoid was that if you clicked the "Connect WebSocket" button and then closed it or reloaded the page, it couldn't be used again.

Not sure if there's still a bug worth fixing, but I feel like I have a reasonable workaround now.

from websocat.

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.