Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including kevoree-group-ws with all npm packages installed. Try it out:

var kevoreeGroupWs = require("kevoree-group-ws")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

kevoree-group-ws v5.3.2

This group uses <strong>WebSockets</strong> to propagate models over the connected nodes.<br/>If the attribute <strong>master</strong> is specified (using the instance name of one of the connected nodes) then a WebSocket server will be listening on that node using the <strong>port</strong> attribute specified in the fragment dictionary of that particular node and every other nodes connected to that group will try to connect to that <strong>master</strong> node.</br>If <strong>master</strong> is empty, then every connected node will try to start a WebSocket server using their <strong>port</strong> fragment attribute.<br/><br/>The attributes <strong>onConnect</strong> and <strong>onDisconnect</strong> expects KevScript strings to be given to them optionally. If set, <strong>onConnect</strong> KevScript will be executed on the <strong>master</strong> node when a new client connects to the master server (and <strong>onDisconnect</strong> will be executed when a node disconnects from the master server)<br/><br/><em>NB: onConnect & onDisconnect can reference the current node that triggered the process by using this notation: {nodeName}</em><br/><em>NB2: {groupName} is also available and resolves to the current WSGroup instance name</em><br/><em>NB3: onConnect & onDisconnect are not triggered if the client nodeName does not match the regex given in the <strong>filter</strong> parameter</em>

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free