Skip to content

Conversation

@olafurw
Copy link

@olafurw olafurw commented Dec 3, 2019

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.

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.
@olafurw
Copy link
Author

olafurw commented Dec 3, 2019

Cheers.

@haganbmj
Copy link
Collaborator

haganbmj commented Dec 5, 2019

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

@olafurw
Copy link
Author

olafurw commented Dec 10, 2019

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.

@olafurw olafurw closed this by deleting the head repository Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants