Api / JavaScript /

Node.on('reconnect', callback)

Event emmited when a node is reconnected.

Arguments

'reconnect' String

callback Function

Example

const server = dop.connect()
server.on('connect', () => console.log('Connected!') )
server.on('reconnect', () => console.log('Reconnected!') )
As server
const listener = dop.listen()
listener.on('connect', node => {
    console.log('New node connected!')
    node.on('reconnect', () => console.log('Reconnected!') )
})

See also