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

If using DNS name, how to get the IP Address after using TCPClient? #219

Open
mezzomix23 opened this issue Mar 11, 2022 · 0 comments
Open

Comments

@mezzomix23
Copy link

Greetings,

I've tried looking in the code and on the net, can't figure out how to print or assign to a variable the IP Address resolved when using a DNS name, either is SwiftSocket or native SwiftUI function.

What I do is something like: let client = TCPClient(address: www.google.com, port: 443). What I need then is to get the IP Address resolved for www.google.com from the device it's being run and for the life of me, cannot find anything to do that.

All I find is how to get device's IP Address or the WiFi IP Address, but not the remote host I'm connecting to.

I'm using XCode 13 and iOS 15.2.

Thank you :)

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

No branches or pull requests

1 participant