Constructor
Constructor([url[, options]])
Wampy constructor can take 2 parameters:
url to wamp server - optional. URL can be specified in next forms:
Undefined/null. In browser environment page-scheme://page-server:page-port/ws will be used in this case.
String, begins with '/', meaning some path on current scheme://host:port.
Full qualified URL, starting with scheme 'ws' or 'wss'.
Host/domain with possible path, but without scheme. In browser environment page-scheme will be used.
options hash-table. The only required field is
realm
. For node.js environment also necessary to specifyws
- websocket module. See description below.
Json serializer will be used by default. If you want to use msgpack or cbor serializer, pass it through options. Also, you can use your own serializer. Just be sure, it is supported on WAMP router side!
Last updated