Module: models/imposter

An imposter represents a protocol listening on a socket. Most imposter
functionality is in each particular protocol implementation. This module
exists as a bridge between the API and the protocol, mapping back to pretty
JSON for the end user.

Source:

Methods

(async, inner) create(Protocol, creationRequest, baseLogger, config, isAllowedConnection) → {Object}

Create the imposter

Parameters:
Name Type Description
Protocol Object

The protocol factory for creating servers of that protocol

creationRequest Object

the parsed imposter JSON

baseLogger Object

the logger

config Object

command line options

isAllowedConnection function

function to determine if the IP address of the requestor is allowed

Source:
Returns:
Type
Object