Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tree: 54caf72458
Fetching contributors…

Cannot retrieve contributors at this time

19 lines (16 sloc) 0.627 kB
Also, if you want to intercept the raw string messages and do your own handling in some cases, you can leave out the `require('ws-rpc').extend(wss);` line above, and do the following:
wss.on('connection', function(client) { // notice: "connection" vs "connect"
client.on('message', function(data, flags) {
if(is_my_message(data)) {
// handle the raw message here
// ...
// notify the RPC extension that this message was already handled
flags.handled = true;
// otherwise the message will be handled as RPC
// only setup the RPC extension after the above
Jump to Line
Something went wrong with that request. Please try again.