ConnectionPool
Extends:
Constructor Summary
Public Constructor | ||
public |
constructor(peerAddresses: PeerAddressBook, networkConfig: NetworkConfig, blockchain: IBlockchain, time: Time) |
Member Summary
Public Members | ||
public set |
allowInboundConnections(value: boolean) |
|
public get |
allowInboundConnections: boolean |
|
public set |
allowInboundExchange(value: boolean) |
|
public get |
bytesReceived: number |
|
public get |
bytesSent: number |
|
public get |
connectingCount: number |
|
public get |
count: number |
|
public get |
peerCount: number |
|
public get |
peerCountDumb: number |
|
public get |
peerCountFull: number |
|
public get |
peerCountFullWsOutbound: number |
|
public get |
peerCountLight: number |
|
public get |
peerCountNano: number |
|
public get |
peerCountOutbound: number |
|
public get |
peerCountRtc: number |
|
public get |
peerCountWs: number |
Method Summary
Public Methods | ||
public |
connectOutbound(peerAddress: PeerAddress): boolean |
|
public |
disconnect(reason: string | *): void |
|
public |
|
|
public |
getConnectionByPeerAddress(peerAddress: PeerAddress): PeerConnection | null |
|
public |
getConnectionsByNetAddress(netAddress: NetAddress): Array<PeerConnection> |
|
public |
getConnectionsBySubnet(netAddress: NetAddress): Array<PeerConnection> |
|
public |
getOutboundConnectionsBySubnet(netAddress: NetAddress): Array<PeerConnection> |
|
public |
valueIterator(): Iterator<PeerConnection> |
|
public |
values(): Array<PeerConnection> |
Inherited Summary
From class Observable | ||
public static get |
WILDCARD: string: string |
|
public |
bubble(observable: Observable, types: ...string) |
|
public |
fire(type: string, args: ...*): Promise | null |
|
public |
off(type: string, id: number) |
|
public |
on(type: string, callback: Function): number |
Public Constructors
public constructor(peerAddresses: PeerAddressBook, networkConfig: NetworkConfig, blockchain: IBlockchain, time: Time) source
Override:
Observable#constructorParams:
Name | Type | Attribute | Description |
peerAddresses | PeerAddressBook | ||
networkConfig | NetworkConfig | ||
blockchain | IBlockchain | ||
time | Time |
Listen:
* |
WebSocketConnector#connection |
* |
WebSocketConnector#error |
* |
WebRtcConnector#connection |
* |
WebRtcConnector#error |
Public Members
public set allowInboundConnections(value: boolean) source
public get allowInboundConnections: boolean source
public set allowInboundExchange(value: boolean) source
public get bytesReceived: number source
public get bytesSent: number source
public get connectingCount: number source
public get count: number source
public get peerCount: number source
public get peerCountDumb: number source
public get peerCountFull: number source
public get peerCountFullWsOutbound: number source
public get peerCountLight: number source
public get peerCountNano: number source
public get peerCountOutbound: number source
public get peerCountRtc: number source
public get peerCountWs: number source
Public Methods
public connectOutbound(peerAddress: PeerAddress): boolean source
Params:
Name | Type | Attribute | Description |
peerAddress | PeerAddress |
Return:
boolean |
public disconnect(reason: string | *): void source
Params:
Name | Type | Attribute | Description |
reason | string | * |
Return:
void |
public disconnectWebSocket() source
public getConnectionByPeerAddress(peerAddress: PeerAddress): PeerConnection | null source
Params:
Name | Type | Attribute | Description |
peerAddress | PeerAddress |
public getConnectionsByNetAddress(netAddress: NetAddress): Array<PeerConnection> source
Params:
Name | Type | Attribute | Description |
netAddress | NetAddress |
public getConnectionsBySubnet(netAddress: NetAddress): Array<PeerConnection> source
Params:
Name | Type | Attribute | Description |
netAddress | NetAddress |
public getOutboundConnectionsBySubnet(netAddress: NetAddress): Array<PeerConnection> source
Params:
Name | Type | Attribute | Description |
netAddress | NetAddress |