Giter Club home page Giter Club logo

Comments (5)

lukeed avatar lukeed commented on August 20, 2024 3

No link yet, sorry~! Forcing myself to build a product in my free time right now. Then I can continue OSS work 😆

You can already get access to the WebSocket instance. All the event listeners have a an event.target, as per the Event object spec. So, for example, you can do this:

let ws;
let socket = new Sockette('ws://...', {
  onopen(ev) {
    ws = ev.target; // save the WebSocket
    // ...
  }
});

// later on

ws.binaryType = 'arraybuffer';

from sockette.

lukeed avatar lukeed commented on August 20, 2024

Sure, but you still need a socket server somewhere. I would recommend ws or uws, which can both be integrated into your Express (or any) server.

I'm working on a Polka demo that use Sockette and uWebSockets. I'll link it here once it's done.

from sockette.

NickNaso avatar NickNaso commented on August 20, 2024

Thanks I will be very useful! 👍

from sockette.

roblav96 avatar roblav96 commented on August 20, 2024

@lukeed please share link :D

Also it would be nice to expose the WebSocket instance, maybe via a getter, to utilize the extra uws client features.

from sockette.

jellydn avatar jellydn commented on August 20, 2024

Just FYI, I have re-implemented https://github.com/jellydn/ws-sockette for NodeJs.

from sockette.

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.