wampy-patch

1.0.1 • Public • Published

wampy-patch

Patch for wampy that converts the headers to wamp.json (default is wamp.2.json) and converts the server protocol to json (since its derived from wamp.2.json string, but that was edited soo)

Installation

npm install wampy-patch

How to use?

Use is very, very simple. However you MUST use the patch before you call the connect method

const WampyPatch = require("wampy-patch")
const Wampy = require("wampy").Wampy

const instance = new Wampy("ws://localhost:8080/path_to_ws", {}) //Or any url obviously, and your options.

isntance.options({}) // If you didnt include options in the constructor

WampyPatch(instance)

instance.connect() // Call AFTER patching

Basically, this should work with any instance, just you have to make sure you dont connect before the patch is added.

Package Sidebar

Install

npm i wampy-patch

Weekly Downloads

2

Version

1.0.1

License

SEE LICENSE IN LICENSE

Unpacked Size

4.33 kB

Total Files

4

Last publish

Collaborators

  • tobi.wtf