wampy-patch
v1.0.1
Published
Patches wampy to support wamp.json (instead of the default that wampy uses, which is wamp.2.json), and reflects that with the server protocol
Downloads
6
Maintainers
Readme
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.