Skip to main content

RSocketWebSocketServer - rsocket-js

Getting Started#

TODO

Example#

npm install rsocket-core rsocket-websocket-server rsocket-flowable
const { RSocketServer } = require('rsocket-core');
const RSocketWebSocketServer = require('rsocket-websocket-server');
const { Single } = require('rsocket-flowable');
const WebSocketTransport = RSocketWebSocketServer.default;
const host = '127.0.0.1';
const port = 3000;
const transportOpts = {
host: host,
port: port,
};
const transport = new WebSocketTransport(transportOpts);
const rSocketServer = new RSocketServer({
transport,
getRequestHandler: function () {
...
},
});
rSocketServer.start();
Last updated on by Kevin Viglucci