The rpc-websockets library enables developers to easily implement their business logic that includes messaging between users, machines or any devices. It provides a possibility to send and receive JSON data through the WebSocket communication protocol in order to support two-way notification push, running RPC methods and firing any types of event signalling. Only clients can call RPC methods and not vice versa at the moment. Both frontend (HTML/JS-based) and backend (Node.js-based) development environments are supported.
rpc-websockets is built on Node.js and supports both LTS and Current versions.
Use the free OSS edition in order to implement and manage your own WebSocket server instances, or subscribe for our Pro plan and have us manage your instances and provide you with management of your methods, events and notifications on an easy-to-use Web Management portal.
Install our OSS library in your project:
npm install rpc-websockets
Write your source code using
var WebSocket = Clientvar WebSocketServer = Server// instantiate Server and start listening for requestsvar server =port: 8080host: 'localhost'// register an RPC methodserver// ...and maybe a protected one alsoserver// create an eventserverevent'feedUpdated'// get eventsconsole// emit an event to subscribersserver// close the serverserver// instantiate Client and connect to an RPC servervar ws = 'ws://localhost:8080'ws
Features of the free open-source edition.
All library's open-source features are documented in our API documentation and can be used free of charge. You are free to implement your solutions based on provided methods in any way you are comfortable with, as long as you use our work along our very permissive license conditions.
In order to support your production-ready environments, we can provide you with additional features built on top of our free OSS edition along with the skill set to turn your business case or a Proof-of-Concept idea into reality.
Describe us your use case by contacting us and we will swiftly get back to you with a proposed solution that meets your needs.
We offer professional support for rpc-websockets and beyond. We have many years of expertise on building robust, scalable Node.js applications and can help you overcome issues and challenges preventing you to ship your great products. We excel in software architecture and implementation, being able to provide you with development, planning, consulting, training and customization services. Feel free to contact us so we can discuss how to help you finish your products!
rpc-websockets is being actively used in production by multiple companies in a variety of different use cases.
Become a sponsor and get your logo on project's README on GitHub with a link to your site. Feel free to contact us for the arrangement!
This library is licensed under LGPLv3. Please see LICENSE for licensing details.