# Overview

## ![](https://github.com/buccaneerai/rxws/raw/master/docs/rxws.png)

[![CircleCI](https://circleci.com/gh/buccaneerai/rxws/tree/master.svg?style=shield)](https://circleci.com/gh/buccaneerai/rxws/tree/master) [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)  [![](https://img.shields.io/npm/v/@buccaneer/rxws.svg)](https://www.npmjs.com/package/@buccaneer/rxws)

## Overview

This package is a simple, reliable, isomorphic, two-way WebSocket client built with [RxJS 6](https://rxjs-dev.firebaseapp.com). It provides these advantages:

* It integrates nicely with RxJS observables.
* Push and pull messages to and from a remote WebSocket server.
* It is compatible with node.js, unlike the RxJS's `WebSocket` object.
* The WebSocket Observable created by this package emits multiple types of events including messages, connection status changes and the websocket itself. It provides operators to pull and publish whichever data is needed.
* The package uses sensible conventions and handles most connectivity interruptions and issues.  But it also gives the user fine-grained control over how to handle different events.
* Uses [socket.io](https://socket.io) under the hood, which is battle-tested, widely used, well maintained and reliable.
* Requires the use of secure WSS unless the user explicitly indicates otherwise.
* Easily integrates with React/Redux, Vue, Angular and other popular front-ends.&#x20;

### Installation

```bash
npm i @buccaneer/rxws --save
```

```bash
yarn add @buccaneer/rxws
```

### Compatibility

| Platform        | Support |
| --------------- | :-----: |
| node.js (>10.8) |    ✅    |
| Browsers        |    ✅    |
| React Native    |    ✅    |
| Electron        |    ✅    |

### Documentation

* [Quick Start](https://brianbuccaneer.gitbook.io/rxws/guides/gettingstarted)
* [Guides](https://brianbuccaneer.gitbook.io/rxws/guides)
* [API Docs](https://brianbuccaneer.gitbook.io/rxws/api)

### Community

Do you like `rxws`? Here's how you can help make it better:

* Star us [on Github](https://github.com/buccaneerai/rxws) ✨ :octocat: ✨
* [Become a contributor (even small contributions matter!)](https://github.com/buccaneerai/rxws/blob/master/CONTRIBUTING.md) 👑
* [Are we missing the operator or feature you need? Make a pull request to add it!](https://github.com/buccaneerai/rxws/blob/master/CONTRIBUTING.md) 🤦&#x20;
* Report & Debug Issues [on GitHub](https://github.com/buccaneerai/rxws) 🌊

### License

MIT


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://brianbuccaneer.gitbook.io/rxws/master.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
