Home Reference Source Test
public class | source

ConnectionPool

Extends:

Observable → ConnectionPool

Constructor Summary

Public Constructor
public

constructor(peerAddresses: PeerAddressBook, networkConfig: NetworkConfig, blockchain: IBlockchain)

Member Summary

Public Members
public set

allowInboundConnections(value: boolean)

public get
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
public get

peerCountLight: number

public get

peerCountNano: number

public get
public get

peerCountRtc: number

public get

peerCountWs: number

public get

peerCountWss: number

Method Summary

Public Methods
public

connectOutbound(peerAddress: PeerAddress): boolean

public

disconnect(reason: string | *): void

public
public
public
public
public
public
public

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) source

Override:

Observable#constructor

Params:

NameTypeAttributeDescription
peerAddresses PeerAddressBook
networkConfig NetworkConfig
blockchain IBlockchain

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 get peerCountWss: number source

Public Methods

public connectOutbound(peerAddress: PeerAddress): boolean source

Params:

NameTypeAttributeDescription
peerAddress PeerAddress

Return:

boolean

public disconnect(reason: string | *): void source

Params:

NameTypeAttributeDescription
reason string | *

Return:

void

public disconnectWebSocket() source

public getConnectionByPeerAddress(peerAddress: PeerAddress): PeerConnection | null source

Params:

NameTypeAttributeDescription
peerAddress PeerAddress

Return:

PeerConnection | null

public getConnectionsByNetAddress(netAddress: NetAddress): Array<PeerConnection> source

Params:

NameTypeAttributeDescription
netAddress NetAddress

Return:

Array<PeerConnection>

public getConnectionsBySubnet(netAddress: NetAddress): Array<PeerConnection> source

Params:

NameTypeAttributeDescription
netAddress NetAddress

Return:

Array<PeerConnection>

public getOutboundConnectionsBySubnet(netAddress: NetAddress): Array<PeerConnection> source

Params:

NameTypeAttributeDescription
netAddress NetAddress

Return:

Array<PeerConnection>

public valueIterator(): Iterator<PeerConnection> source

Return:

Iterator<PeerConnection>

public values(): Array<PeerConnection> source

Return:

Array<PeerConnection>