Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SocketInfo, update opened promise #19

Merged
merged 4 commits into from
Oct 2, 2023
Merged

Add SocketInfo, update opened promise #19

merged 4 commits into from
Oct 2, 2023

Conversation

jasnell
Copy link
Collaborator

@jasnell jasnell commented Sep 30, 2023

The opened promise resolves to a SocketInfo.

SocketInfo provides remoteAddress and (optionally) localAddress

const socket = connect('https://example.com');
const info = await socket.info;
console.log(info.remoteAddress);
console.log(info.localAddress);

The `opened` promise resolves to a `SocketInfo`.

`SocketInfo` provides `remoteAddress` and (optionally) `localAddress`
@dom96 dom96 merged commit 34cb571 into main Oct 2, 2023
3 checks passed
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.

None yet

2 participants