pass gun's options to websocket

I recently had to set options given to the websocket client especially 

rejectUnauthorized {Boolean} Verify or not the server certificate.

for connecting to wss which are using self signed certs...
could also pass things like 'protocol' to differentiate a Gun websocket connection from some other websocket connection....

I don't know if maybe websock options should be a object in options instead ?  To avoid namespace collision?
This commit is contained in:
d3x0r 2016-12-21 11:21:13 -08:00 committed by GitHub
parent 2e7b87c3b9
commit e8f840c548

View File

@ -134,7 +134,7 @@ API.connect = function () {
var url = this.url;
// Open a new websocket.
var socket = new WebSocket(url);
var socket = new WebSocket(url, this.options);
// Re-use the previous listeners.
socket._events = this._events;