RxWS SocketIO
Reactive Web Sockets on top of SocketIO
RxWS is a RESTful reactive JavaScript implementation on top of web sockets. This includes, GET, POST, PUT, REMOVE (DELETE), PATCH, and HEAD. RxWS guarantees message delivery by generating a correlation id for each message (to and from the server). Both the server and client automatically send an acknowledgement response for each request. If there is no acknowledgement after a timeout, an error is thrown.
RxWS implements a RESTful protocol. You can use any web socket server as long as it implements the same protocol.
Client library
The client library is available at https://github.com/CanopyTax/rxws
Setup
npm install --save rxws-socketio socket.io
Example
// Server;; let server = ; { rxSocket ;} server;
// Client;; rxws; ;
API
/** * Middleware handler - The middleware is executed in the order that it is defined. * * @param * @return * be manipulated. */rxSocket ; /** * Error middleware handler * * @param * @return * request, response, and next method. Calling next will route * to the next error handling middleware. */rxSocket ; /** * RESTful methods are available on rxSocket * * @param * The only available parameters for a given resource are parameters * that match a given resource. For example, the resource 'questions' * can only take a 'questions' parameter. Anything else will error. * Nested resources need to have each resource represented with a * parameter except for the last resource, which is optional. * @return * must be destructured to get both the request and response. */rxSocket /** RestFul Listeners **/rxSocket;rxSocket;rxSocket;rxSocket;rxSocket; /** * Server sent messages - possible other verbs? send, emit, write * * @param * @param */rxSocket;