Api / JavaScript /

Listener.on('disconnect', callback)

Event emmited when a node is disconnected. The disconnected event only emmits when server calls Node.disconnect. Or when timeout is reached on transports that use it.

Arguments

'disconnect' String

callback Function

Example

const listener = dop.listen()
listener.on('connect', node => console.log('Connected!') )
listener.on('disconnect', node => console.log('Disconnected!') )

See also