faye-websocket
Advanced tools
Comparing version 0.10.0 to 0.11.0
@@ -0,1 +1,5 @@ | ||
### 0.11.0 / 2016-02-24 | ||
* Introduce a `net` option to the `Client` class for setting things like, say, `servername` | ||
### 0.10.0 / 2015-07-08 | ||
@@ -2,0 +6,0 @@ |
@@ -25,16 +25,21 @@ var util = require('util'), | ||
var proxy = options.proxy || {}, | ||
endpoint = url.parse(proxy.origin || this.url), | ||
port = endpoint.port || DEFAULT_PORTS[endpoint.protocol], | ||
secure = SECURE_PROTOCOLS.indexOf(endpoint.protocol) >= 0, | ||
onConnect = function() { self._onConnect() }, | ||
originTLS = options.tls || {}, | ||
socketTLS = proxy.origin ? (proxy.tls || {}) : originTLS, | ||
self = this; | ||
var proxy = options.proxy || {}, | ||
endpoint = url.parse(proxy.origin || this.url), | ||
port = endpoint.port || DEFAULT_PORTS[endpoint.protocol], | ||
secure = SECURE_PROTOCOLS.indexOf(endpoint.protocol) >= 0, | ||
onConnect = function() { self._onConnect() }, | ||
netOptions = options.net || {}, | ||
originTLS = options.tls || {}, | ||
socketTLS = proxy.origin ? (proxy.tls || {}) : originTLS, | ||
self = this; | ||
netOptions.host = socketTLS.host = endpoint.hostname; | ||
netOptions.port = socketTLS.port = port; | ||
originTLS.ca = originTLS.ca || options.ca; | ||
socketTLS.servername = socketTLS.servername || endpoint.hostname; | ||
this._stream = secure | ||
? tls.connect(port, endpoint.hostname, socketTLS, onConnect) | ||
: net.connect(port, endpoint.hostname, onConnect); | ||
? tls.connect(socketTLS, onConnect) | ||
: net.connect(netOptions, onConnect); | ||
@@ -41,0 +46,0 @@ if (proxy.origin) this._configureProxy(proxy, originTLS); |
{ "name" : "faye-websocket" | ||
, "description" : "Standards-compliant WebSocket server and client" | ||
, "homepage" : "http://github.com/faye/faye-websocket-node" | ||
, "homepage" : "https://github.com/faye/faye-websocket-node" | ||
, "author" : "James Coglan <jcoglan@gmail.com> (http://jcoglan.com/)" | ||
@@ -8,4 +8,4 @@ , "keywords" : ["websocket", "eventsource"] | ||
, "version" : "0.10.0" | ||
, "engines" : {"node": ">=0.4.0"} | ||
, "version" : "0.11.0" | ||
, "engines" : {"node": ">=0.8.0"} | ||
, "main" : "./lib/faye/websocket" | ||
@@ -21,3 +21,3 @@ , "dependencies" : {"websocket-driver": ">=0.5.1"} | ||
, "bugs" : "http://github.com/faye/faye-websocket-node/issues" | ||
, "bugs" : "https://github.com/faye/faye-websocket-node/issues" | ||
} |
@@ -12,3 +12,3 @@ # faye-websocket | ||
rather makes it easy to handle WebSocket connections within an existing | ||
[Node](http://nodejs.org/) application. It does not provide any abstraction | ||
[Node](https://nodejs.org/) application. It does not provide any abstraction | ||
other than the standard [WebSocket API](http://dev.w3.org/html5/websockets/). | ||
@@ -134,4 +134,4 @@ | ||
The `tls` value is a Node 'TLS options' object that will be passed to | ||
[`tls.connect()`](http://nodejs.org/api/tls.html#tls_tls_connect_options_callback). | ||
The `tls` value is an object that will be passed to | ||
[`tls.connect()`](https://nodejs.org/api/tls.html#tls_tls_connect_options_callback). | ||
@@ -203,5 +203,8 @@ | ||
* `proxy` - settings for a proxy as described above | ||
* `tls` - a Node 'TLS options' object containing TLS settings for the origin | ||
server, this will be passed to | ||
[`tls.connect()`](http://nodejs.org/api/tls.html#tls_tls_connect_options_callback) | ||
* `net` - an object containing settings for the origin server that will be | ||
passed to | ||
[`net.connect()`](https://nodejs.org/api/net.html#net_socket_connect_options_connectlistener) | ||
* `tls` - an object containing TLS settings for the origin server, this will be | ||
passed to | ||
[`tls.connect()`](https://nodejs.org/api/tls.html#tls_tls_connect_options_callback) | ||
* `ca` - (legacy) a shorthand for passing `{tls: {ca: value}}` | ||
@@ -322,3 +325,3 @@ | ||
Copyright (c) 2010-2015 James Coglan | ||
Copyright (c) 2010-2016 James Coglan | ||
@@ -325,0 +328,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of |
36921
17
502
340