Closed olafurw closed 1 year ago
Cheers.
I'd rather just leave it open ended and do something like this where all of the unnecessary args are passed on to the underlying WebSocket.
obs.connect({
address: 'localhost:4444',
handshakeTimeout: 1000,
whateverElse: 1
})
or
obs.connect({
address: 'localhost:4444',
options: {
handshakeTimeout: 1000,
whateverElse: 1
}
})
That said, I need to sit down and just double check that this isn't a browser versus node compatibility issue. I'm seeing different constructors, but maybe isomorphic-ws can help with that too.
https://www.npmjs.com/package/ws https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/WebSocket
Want me to PR it or are you going to look at it? I'd actually prefer the options separately since they could overlap with features in this lib.
Description:
User can now provide timeout: [somenumber] as a connection attribute alongside address and password. This was needed because of intermittent connection problems and reconnection and the default timeout timer was too long.