ethereumjs-monorepo

@ethereumjs/devp2p / Server

Class: Server

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Server(dpt, privateKey, options)

Parameters

Name Type
dpt DPT
privateKey Uint8Array
options DPTServerOptions

Defined in

packages/devp2p/src/dpt/server.ts:35

Properties

events

events: EventEmitter

Defined in

packages/devp2p/src/dpt/server.ts:25

Methods

_handler

_handler(msg, rinfo): void

Parameters

Name Type
msg Uint8Array
rinfo RemoteInfo

Returns

void

Defined in

packages/devp2p/src/dpt/server.ts:139


_isAliveCheck

_isAliveCheck(): void

Returns

void

Defined in

packages/devp2p/src/dpt/server.ts:120


_send

_send(peer, typename, data): Uint8Array

Parameters

Name Type
peer PeerInfo
typename string
data any

Returns

Uint8Array

Defined in

packages/devp2p/src/dpt/server.ts:124


bind

bind(…args): void

Parameters

Name Type
...args any[]

Returns

void

Defined in

packages/devp2p/src/dpt/server.ts:62


destroy

destroy(…args): void

Parameters

Name Type
...args any[]

Returns

void

Defined in

packages/devp2p/src/dpt/server.ts:69


findneighbours

findneighbours(peer, id): void

Parameters

Name Type
peer PeerInfo
id Uint8Array

Returns

void

Defined in

packages/devp2p/src/dpt/server.ts:115


ping

ping(peer): Promise<any>

Parameters

Name Type
peer PeerInfo

Returns

Promise<any>

Defined in

packages/devp2p/src/dpt/server.ts:79