diff --git a/lib/fox_api.js b/lib/fox_api.js index 4e32d9b..de9a080 100644 --- a/lib/fox_api.js +++ b/lib/fox_api.js @@ -6,9 +6,10 @@ const Session = require('./session') const tools = require('./tools') function FoxApi (realm) { - Session.call(this) - - this.gate = this + this.getEncoder = function () { + return this + } + Session.call(this, this) this.sessionId = tools.randomId() // API functions diff --git a/lib/hyper/gate.js b/lib/hyper/gate.js index bd3dd11..11a57b0 100644 --- a/lib/hyper/gate.js +++ b/lib/hyper/gate.js @@ -31,10 +31,7 @@ class FoxGate extends BaseGate { sendWelcome (session, cmd) { session.send({ id: cmd.id, - rsp: RESULT_OK, - data: { kv: { - realmInfo: session.getRealmInfo() - } } + rsp: RESULT_OK }) } diff --git a/lib/session.js b/lib/session.js index 3fbcb6f..3455452 100644 --- a/lib/session.js +++ b/lib/session.js @@ -116,14 +116,6 @@ function Session (gateHandler, sender, sessionId) { this.getGateProtocol = function () { return gateHandler.getProtocol() } - - this.getRealmInfo = function () { - if (this.realm) { - return this.realm.getInfo() - } else { - return {} - } - } } module.exports = Session diff --git a/lib/wamp/api.js b/lib/wamp/api.js index ba8b7c8..a1244f1 100644 --- a/lib/wamp/api.js +++ b/lib/wamp/api.js @@ -10,9 +10,7 @@ function WampApi (realm) { this.getEncoder = function () { return this } - Session.call(this, this) - this.sessionId = tools.randomId() // API functions diff --git a/package-lock.json b/package-lock.json index 55140e3..9da284a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "fox-wamp", - "version": "0.5.14", + "version": "0.5.15", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1264,9 +1264,9 @@ } }, "ws": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.0.tgz", - "integrity": "sha512-deZYUNlt2O4buFCa3t5bKLf8A7FPP/TVjwOeVNpw818Ma5nk4MLXls2eoEGS39o8119QIYxTrTDoPQ5B/gTD6w==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz", + "integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==", "requires": { "async-limiter": "~1.0.0" } diff --git a/package.json b/package.json index 8ca7715..820af25 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fox-wamp", - "version": "0.5.14", + "version": "0.5.15", "description": "Web Application Message Router/Server WAMP/MQTT", "author": { "name": "Anatoly Tsapkov", @@ -27,7 +27,7 @@ "mqtt-packet": "^6.1.1", "node-statsd": "*", "qlobber": "*", - "ws": "^6.2.0" + "ws": "^6.2.1" }, "devDependencies": { "autobahn": "^18.10.2",