-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Description
- I've searched for any related issues and avoided creating a duplicate issue.
Description
We have a kind of exotic use case where we want to instantiate a websocket off an existing stream that's not from an HTTP or unix socket source. Currently the createConnection
method is hardcoded to either create a TLS or standard net connection:
Line 654 in f871195
opts.createConnection = isSecure ? tlsConnect : netConnect; |
I suggest allowing a custom createConnection
function to be passed in the websocket options and, if present, it should take precedence over the existing default logic.
I'm happy to put together a PR for this if it's something you'd accept 🙂
ws version
8.2.2
Node.js Version
v16.6.1
System
System:
OS: Windows 10 10.0.19043
CPU: (24) x64 AMD Ryzen 9 5900X 12-Core Processor
Memory: 23.22 GB / 63.89 GB
Expected result
N/A
Actual result
N/A
Attachments
No response
Metadata
Metadata
Assignees
Labels
No labels