protoo-server is a Node.js module that forms the server-side component of the protoo signaling framework. This framework is designed for building minimalist and extensible signaling layers for multi-party Real-Time Communication (RTC) applications, such as video conferencing or collaborative tools. Currently at version 4.0.8, the library maintains a steady release cadence, evidenced by its significant major version updates. It differentiates itself by providing a clear, event-driven API for managing WebSocket connections, peers, and rooms, allowing developers to focus on RTC logic rather than low-level WebSocket intricacies. The module facilitates the creation of `Room`s to organize connected `Peer`s, enabling efficient message routing and state management within a signaling context. Its focus on being "minimalist" means it provides core signaling primitives without enforcing complex architectural patterns.
npm install protoo-serverVerified import paths — ran on the pinned version, not inferred.
This quickstart sets up a basic protoo-server instance using WebSocket over HTTP. It demonstrates how to handle incoming peer connections, process requests and notifications from connected peers, and respond to a simple 'echo' or 'joinRoom' request, illustrating a fundamental signaling flow.
Update all instances of `peer.send(data)` to `peer.request(data)`.
Remove any usage of `room.spread()`. You will need to implement custom logic for broadcasting messages to peers within a room, likely by iterating through `room.peers` and calling `peer.notify()` or `peer.request()` individually.
Ensure you have `ws` or a compatible WebSocket server installed and correctly configured to pass its instance or connections to `protoo-server.Server` during initialization.
Rename `peer.send()` calls to `peer.request()`.
The `room.spread()` method has been removed. Replace its functionality with custom iteration over `room.peers` to send notifications or requests to each peer.
Verify that `httpServer.listen()` is correctly called and that the port is not already in use. Check server logs for startup errors. Ensure the client is connecting to the correct WebSocket URL.
No dependency data recorded yet.