Network
Network represent a network layer with three main components:
- The network itself, which can be a RPS, like SprayAdapter, or an overlay, like LatenciesOverlay.
- The signaling part, which is a connection with a signaling server used by peers to join the network.
- The communication part, which allow a peer to send message in the network using broadcast or unicast channels.
Constructor Summary
Public Constructor | ||
public |
constructor(network: AbstractNetwork, signaling: Object, protocol: string) Constructor |
Member Summary
Public Members | ||
public get |
The communication component |
|
public get |
The network component |
|
public get |
protocol: [type]: * Get the protocol of the network |
|
public get |
The signaling component |
Private Members | ||
private |
|
|
private |
_network: * |
|
private |
_protocol: * |
|
private |
_signaling: * |
Method Summary
Public Methods | ||
public |
Register a middleware, with an optional priority |
Public Constructors
public constructor(network: AbstractNetwork, signaling: Object, protocol: string) source
Constructor
Params:
Name | Type | Attribute | Description |
network | AbstractNetwork | The network layer |
|
signaling | Object | Options used to build the signaling part |
|
signaling.address | string | URL of the signaling server |
|
signaling.room | string | Name of the room in which the application run |
|
protocol | string | Name of the protocol run by the network |