Class: Interfaces

Interfaces

new Interfaces(Subject) → {Interfaces}

Interface manager
Parameters:
Name Type Description
Subject Subject a Subject instance
Source:
Returns:
- a new Interface manager
Type
Interfaces

Methods

<private, static> installNDN(NDN)

Class method to install ndn-lib. Only necessary if you require("ndn-classes/src/DataStructures/Interfaces.js"), done for you if require('ndn-classes').Interfaces
Parameters:
Name Type Description
NDN Object NDN the ndn-lib object
Source:

dispatch(element, faceFlag, callback) → {Interfaces}

Dispatch an element to one or more Faces
Parameters:
Name Type Description
element Buffer the raw packet to dispatch
faceFlag Number an Integer representing the faces to send one
callback function called per face sent, used for testing
Source:
Returns:
for chaining
Type
Interfaces

installTransport(Transport) → {Interfaces}

Install a transport Class to the Interfaces manager. If the Class has a Listener function, the Listener will be invoked
Parameters:
Name Type Description
Transport Transport a Transport Class matching the Abstract Transport API
Source:
Returns:
for chaining
Type
Interfaces

newFace(protocol, connectionParameters) → {Number}

Create a new Face
Parameters:
Name Type Description
protocol String a string matching the .protocolKey property of a previously installed Transport
connectionParameters Object the object expected by the transport class
Source:
Returns:
id the numerical faceID of the created Face.
Type
Number