Class: WsTransport

bitmessage/net/ws. WsTransport

new WsTransport(optsopt)

WebSocket transport class. Implements base transport interface.

Parameters:
Name Type Attributes Description
opts Object <optional>

Transport options

Properties
Name Type Description
seeds Array

Bootstrap nodes (none by default)

services Object

Service features provided by this node (NODE_MOBILE for Browser and NODE_MOBILE + NODE_GATEWAY for Node by default)

userAgent Array | string | Buffer

User agent of this node (user agent of bitmessage library by default)

streams Array.<number>

Streams accepted by this node ([1] by default)

port number

Incoming port of this node, makes sence only on Node platform (18444 by default)

Source:

Methods

connect()

Connect to a WebSocket node. Connection arguments are the same as for WebSocket.

Source:

listen()

Listen for incoming WebSocket connections. Listen arguments are the same as for WebSocketServer. Available only for Node platform.

Source: