Api / JavaScript /

listen( [options] )

Creates a new Listener instance that listen for new connections/nodes.

Arguments

[options] Object

Returns

A new Listener instance.

Examples

const dop = require('dop')
const listener = dop.listen()

Equivalent to

const dop = require('dop')
const wsTransport = require('dop-transports').listen.ws
const listener = dop.listen({ transport:wsTransport, port:4444, timeout:60 })

See also