Comparing version 0.6.0 to 0.6.1
@@ -22,4 +22,3 @@ var DDPClient, EventEmitter, WebSocket, | ||
function DDPClient(hostname, port, url) { | ||
if (url == null) url = "websocket"; | ||
function DDPClient(dict) { | ||
this.subscribe = __bind(this.subscribe, this); | ||
@@ -33,3 +32,10 @@ this.call = __bind(this.call, this); | ||
this.next_id = __bind(this.next_id, this); | ||
this.socket_url = "ws://" + hostname + ":" + port + "/" + url; | ||
var hostname, port, protocol, url; | ||
hostname = dict.hostname; | ||
port = dict.port || false; | ||
url = dict.url || "websocket"; | ||
protocol = dict.use_ssl ? "wss" : "ws"; | ||
this.socket_url = "" + protocol + "://" + hostname; | ||
if (port) this.socket_url += ":" + port; | ||
this.socket_url += "/" + url; | ||
} | ||
@@ -36,0 +42,0 @@ |
{ | ||
"name": "ddpclient", | ||
"version": "0.6.0", | ||
"version": "0.6.1", | ||
"description": "Node.js module to connect to servers using DDP protocol.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,3 +0,3 @@ | ||
Node.js DDP Client v0.6 | ||
======================= | ||
Node.js DDP Client v0.6.1 | ||
========================= | ||
@@ -4,0 +4,0 @@ Node.js module to connect to servers using DDP protocol. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
8818
127