Starting with version 0.7, Faye includes an API for monitoring activity occurring inside the engine. This means that you can attach event listeners to monitor the creation and destruction of client sessions, find out when clients subscribe and unsubscribe from channels, and view published messages.
You attach an event listener to your server as follows:
var bayeux = new Faye.NodeAdapter({mount: '/faye', timeout: 45})
bayeux.on('handshake', function(clientId) {
})
Available events:
handshake [clientId] - starts when a new client connects and issues with an identifier.
subscribe [clientId, channel] - starts when the client subscribes to the channel. This does not work if the message / meta / subscribe is received for an existing subscription.
[clientId, channel] - , . , /meta/unsubscribe , .
publish [clientId, channel, data] - , non/meta/**. ( ), , , .
disconnect [clientId] - , , , //, , .
,