1.0.0 • Published 4 years ago

socket.io-bridge-client v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

socket.io-bridge-client

Client implementation for socket.io-bridge.

Please find the project documentation at https://github.com/michaelfranzl/socket.io-bridge .

API Reference

Classes

Typedefs

BridgeClient

Kind: global class

new BridgeClient(opts)

ParamType
optsObject
opts.socketSocket

BridgeClient.make(opts) ⇒ Promise

Make a Socket.IO bridge to another client.

Kind: static method of BridgeClient
Returns: Promise - - Promise resolving with a Socket.IO client socket connecting to the requested peer/client. The Promise can be used only for a single connection, e.g. when peerUid is set and there will be no incoming connections.

ParamTypeDefaultDescription
optsObject
opts.uidstring"globally unique"Our ID.
opts.peerUidstringThe ID of the peer we want to establish a connection to.
opts.onconnectiononconnectionCalled for each incoming connection.
opts.loggerobjectNo logging by default

BridgeClient~onconnection : function

Called as soon as the peer identified by peerUid is available for a connection.

Kind: inner typedef of BridgeClient

ParamTypeDescription
socketSocketSocket.IO client socket connecting to the requested peer/client.

Socket

Kind: global typedef
See: https://github.com/socketio/socket.io-client/blob/master/docs/API.md#socket

1.0.0

4 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago