ethereumjs-monorepo

@ethereumjs/devp2p / RLPx

Class: RLPx

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new RLPx(privateKey, options)

Parameters

Name Type
privateKey Uint8Array
options RLPxOptions

Defined in

packages/devp2p/src/rlpx/rlpx.ts:55

Properties

clientId

Readonly clientId: Uint8Array

Defined in

packages/devp2p/src/rlpx/rlpx.ts:40


events

events: EventEmitter

Defined in

packages/devp2p/src/rlpx/rlpx.ts:34


id

Readonly id: Uint8Array

Defined in

packages/devp2p/src/rlpx/rlpx.ts:36

Methods

_connectToPeer

_connectToPeer(peer): void

Parameters

Name Type
peer PeerInfo

Returns

void

Defined in

packages/devp2p/src/rlpx/rlpx.ts:192


_getOpenQueueSlots

_getOpenQueueSlots(): number

Returns

number

Defined in

packages/devp2p/src/rlpx/rlpx.ts:188


_getOpenSlots

_getOpenSlots(): number

Returns

number

Defined in

packages/devp2p/src/rlpx/rlpx.ts:184


_isAlive

_isAlive(): boolean

Returns

boolean

Defined in

packages/devp2p/src/rlpx/rlpx.ts:176


_isAliveCheck

_isAliveCheck(): void

Returns

void

Defined in

packages/devp2p/src/rlpx/rlpx.ts:180


_onConnect

_onConnect(socket, peerId): void

Parameters

Name Type
socket Socket
peerId null | Uint8Array

Returns

void

Defined in

packages/devp2p/src/rlpx/rlpx.ts:201


_refillConnections

_refillConnections(): void

Returns

void

Defined in

packages/devp2p/src/rlpx/rlpx.ts:286


connect

connect(peer): Promise<void>

Parameters

Name Type
peer PeerInfo

Returns

Promise<void>

Defined in

packages/devp2p/src/rlpx/rlpx.ts:137


destroy

destroy(…args): void

Parameters

Name Type
...args any[]

Returns

void

Defined in

packages/devp2p/src/rlpx/rlpx.ts:125


disconnect

disconnect(id): void

Parameters

Name Type
id Uint8Array

Returns

void

Defined in

packages/devp2p/src/rlpx/rlpx.ts:169


getPeers

getPeers(): (Socket | Peer)[]

Returns

(Socket | Peer)[]

Defined in

packages/devp2p/src/rlpx/rlpx.ts:165


listen

listen(…args): void

Parameters

Name Type
...args any[]

Returns

void

Defined in

packages/devp2p/src/rlpx/rlpx.ts:118