-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
Use Case
As a Developer
I want the driver to use injected net adapter to create TCP sockets.
So that I can connect to MongoDB in environments without a native Node.js network stack.
User Experience
- Driver uses provided net adapter instead of require('net').
Risks/Unknowns
- This is the biggest ticket because it forces us to update the state machine, encrypter, connect logic, and potentially other internal components to access the user-provided net adapter instead of the global module.
Acceptance Criteria
Implementation Requirements
- Remove import: remove require('net') from all places inside src folder.
- Use net adapter provided with the mongo client options.
- If dns adapter is provided - connection must use its lookup method.
Testing Requirements
- Tests are running inside custom vm.Context without system net module available.
- Existing integration tests should pass when custom net adapter is provided, no node:net should be imported.
Documentation Requirements
- DOCSP ticket, API docs, etc
Follow Up Requirements
- additional tickets to file, required releases, etc
- if node behavior differs/will differ from other drivers, confirm with dbx devs what standard to aim for and what plan, if any, exists to reconcile the diverging behavior moving forward
- depends on
-
NODE-7382 Implement Pluggable DNS Adapter
-
- Backlog
-