0.17.0 • Published 1 year ago

@otpjs/transports-epmd v0.17.0

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

@otpjs/transports-epmd

Listens on an ephemeral port for incoming connections. Registers new connections with the provided otpjs node using @otpjs/transports-tcp. Publishes the otpjs node's name and ephemeral port number on the specified epmd instance.

Usage

Installation

npm i @otpjs/transports-epmd

Exports

register(node: otp.Node, options = {})

Creates a TCP server, listens for incoming connections, and registers said server with an epmd instance.

Options
ParameterDefaultDescription
bridgefalseForwards node discovery messages, acts as relay
typeSymbol.for("temporary")Node persistence strategy
epmdSee belowSee below
tcpSee belowSee below
EPMD Options

EPMD options regarding which epmd instance to connect to. Should be an object with the following properties:

ParameterDefaultDescription
host"localhost"Host to connect to epmd on
port4369Port to connect to epmd on
TCP Options

Object passed to created @otpjs/transports-tcp instances for incoming connections.

See the @otpjs/transports-tcp README for available options.

Registration

After initializing your otpjs node, invoke the register function to connect to epmd and publish your connection details.

import epmd from '@otpjs/transports-epmd';

// build node

epmd.register(node, options);

Teardown

@otpjs/transports-epmd maintains a persistent connection to the epmd instance, indicating its lifecycle. In order to disconnect from the epmd instance, invoke the returned destroy function.

const destroy = epmd.register(node, options);

// When you want to remove the published connection details and close the listener
destroy();
0.15.4

1 year ago

0.16.0

1 year ago

0.17.0

1 year ago

0.15.0

2 years ago

0.14.0

2 years ago

0.13.0

2 years ago

0.12.3

2 years ago

0.12.0

2 years ago

0.10.0

2 years ago

0.11.0

2 years ago

0.10.0-beta.13

2 years ago

0.10.0-beta.0

2 years ago