0.3.2 • Published 5 years ago

react-native-reconnecting-websocket-client v0.3.2

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago
RN Reconnecting WebSocket with 2 Groups of Clients

Used for communication between two types of clients, producers and consumers.

Implementation

import BTSWebSocket from "react-native-reconnecting-websocket-client";

const socket = new BTSWebSocket("https://localhost:8080", null, {
    userType: "consumer"
});

BTSWebSocket extends ReconnectingWebSocket from this package and uses all its methods plus a couple of things

Options

The same options + userType, takes a string value of either "consumer" or "producer".

Methods

BTSWebSocket.broadcast(event, data)
  • event : "update" for normal broadcasts, "emergency" for fatal broadcasts.
  • data : can be anything.
0.3.2

5 years ago

0.3.0

5 years ago

0.3.1

5 years ago

0.2.7

5 years ago

0.2.6

5 years ago

0.2.5

5 years ago

0.2.4

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.1.0

5 years ago