Socket.io
peerjs
Socket.io | peerjs | |
---|---|---|
855 | 26 | |
62,362 | 13,000 | |
0.2% | 0.4% | |
7.0 | 6.6 | |
16 days ago | 8 days ago | |
TypeScript | TypeScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Socket.io
-
Real-Time Sync Alternatives: Vaultrice vs. localStorage, DIY, Firebase, Pusher
This is the path of ultimate control. You spin up a Node.js server, add the socket.io library for WebSocket communication, and use a Redis instance to manage connection state and pub/sub messaging across multiple server instances.
-
Build a Real-time Chat App with Vue 3, Socket.io and Nodejs
So far, we have created our server using express’ HTTP Server and also initialized our Socket.io using the server instance we created.
-
10 Node.js 24 features you’re probably not using
Another heavily dependent external library for Node.js apps is the ws or Socket.IO for client connections to real-time data feeds or interacting with other WebSocket servers.
-
The Silent Chat: Fixing Real-Time Notifications That Didn’t Notify Anyone
-Socket.IO for real-time events
-
Ask HN: How would you build a turn-based multiplayer browser game in 2025?
I've recently been tinkering away at a turn-based multiplayer browser game in my downtime. I'm a Typescript guy so my current tech stack is Next.js, Node.js, and ws[0] for WebSockets (though I'm thinking of switching over to socket.io[1] given how much more they provide out of the box).
Right now my main concern is how to handle continuous deployments without interrupting ongoing games (amongst other WebSocket challenges[2]). I was planning to deploy via Coolify, but am considering other options given that their zero downtime deploys still needs some love[3].
How would you approach building a turn-based multiplayer browser game in 2025?
[0] https://www.npmjs.com/package/ws
[1] https://www.npmjs.com/package/socket.io
[2] https://news.ycombinator.com/item?id=42816359
[3] https://news.ycombinator.com/item?id=43589794
-
Mastering WebSockets with Socket.IO: A Comprehensive Guide
In line 32 we have the socket.io editaData event which handles data editing in the server. When the user clicks edit in the client, the server searches for the data using the findIndex method. If it exists it updates the data in the crudData array then it broadcasts the edited data to the client.
-
Tools for Building a Modern JavaScript Booking Application
Tools like Socket.IO and WebSockets significantly simplify the implementation of real-time communication between client and server.
-
Custom Angular and Karma Test Extension for VS Code
To capture the test execution status, I wrote a custom karma reporter(a good resource) with which I was able to emit the test execution status back to the vscode extension. I am using socket.io to do this communication.
-
Stop sharing your screen, start sharing your website
Building such experiences is already possible, using libraries such as socket.io and React Together. This blog post explains how to easily add real-time collaboration to an existing React app, using React Together.
-
SSE, WebSockets, or Polling? Build a Real-Time Stock App with React and Hono
Complexity: WebSockets require you to handle connection lifecycle events, such as errors and reconnections. While the code example I provided could suffice for simple use cases, more complex use cases might arise, like automatic reconnection and queueing messages sent by the client when the connection wasn't open. For that, you can either extend this code or use an external library like react-use-websocket for a relatively lightweight react implementation or socketio for both client and server SDKs.
peerjs
-
WebRTCPeerProvider component in FilePizza codebase.
Read more about Peerjs.
-
Bow to the rectangle
For solution #2 there is a much broader range of applications that are possible. Frameworks like Socket Supply Co and tools like PeerJS are also available. However designing a peer to peer application that is useful and accessible to ordinary users is going to be very hard.
-
Show HN: Screen Sharing in the Browser–No Downloads, No Registrations
config?: any;
Since we're not overriding it, we take the default. And `defaultConfig` leads us to: https://github.com/peers/peerjs/blob/c073252f879b57757f8a82d... which lists STUN & TURN servers.
… so it sure looks to me like it is using a TURN server…
-
Show HN: I built a website to share files and messages without any server
look at https://peerjs.com that this the project is using.
-
Help us prioritize features for our decentralized p2p chat app
this app is using peerjs to connect peers over a webrtc connection. check out thier docs for more info. with webrtc, things like file-transfer, should be very performant compared to cloud storage providers... especially over LAN. network speed doesnt seems to be an issue i have experienced.
- Blockchain as a Datastructure
-
Some things I learned, retrofitting a browser-based RTS for network multiplayer.
I'm using the client-side PeerJS https://peerjs.com/ library for networking. As the name may imply, a direct connection is established between two peers using WebRTC via "handshake" through an intermediary server they host - and, they provide source for the server as well. I have found it to be quite reliable, thus far.
-
A question about webrtc
You kind of sound like a beginner. The browser APIs are a bit painful to work with. It might be easier to use PeerJS: https://peerjs.com/
-
Create a Keyword Generator Chrome Extension🔥
If you want you can use Preact. PreactJS is a lightweight alternative to ReactJS, designed for high performance and compatibility. is often used in applications where performance is critical and has a small footprint.
-
Do you feel that programming has been easier to understand in game development versus other types of programming because of your experience with actual videogames?
This opens up a lot of neat possibilities, and fortunately I found a very easy JavaScript library for handling multiplayer called PeerJS. The way you can send packets from player to player is very simple and something even a beginner to JavaScript could understand.
What are some alternatives?
SocketCluster - Highly scalable realtime pub/sub and RPC framework
simple-peer - 📡 Simple WebRTC video, voice, and data channels
SockJS - WebSocket emulation - Node.js server
mediasoup - Cutting Edge WebRTC Video Conferencing
Primus - :zap: Primus, the creator god of the transformers & an abstraction layer for real-time to prevent module lock-in.
js-libp2p-webrtc-star - libp2p WebRTC transport that includes a discovery mechanism provided by the signalling-star