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 ResolveIPAddr and ResolveUnixAddr #23

Open
paralin opened this issue Apr 7, 2024 · 7 comments
Open

Add ResolveIPAddr and ResolveUnixAddr #23

paralin opened this issue Apr 7, 2024 · 7 comments

Comments

@paralin
Copy link
Contributor

paralin commented Apr 7, 2024

net/udpsock.go

Line 84 in a794174

func ResolveUDPAddr(network, address string) (*UDPAddr, error) {

I see that ResolveTCPAddr is in, could ResolveIPAddr and ResolveUnixAddr be added?

@paralin paralin changed the title Add ResolveIPAddr Add ResolveIPAddr and ResolveUnixAddr Apr 7, 2024
@scottfeldman
Copy link
Contributor

ResolveIPAddr looks doable. You want to try a crack at implementing? It should be vary similar to ResolveUDPAddr.

We don't have unix socket support in tinygo "net" package, so I would say No.

@scottfeldman
Copy link
Contributor

Are you wanting to use these funcs for real networking, or just to compile? If just for compile, we could add stubs that return "not implemented". That would make the compiler happy.

@paralin
Copy link
Contributor Author

paralin commented Apr 8, 2024

I think just the stubs are fine for now!

@scottfeldman
Copy link
Contributor

Oh, that's easy then. Would you submit a PR to add those stubs?

@paralin
Copy link
Contributor Author

paralin commented Apr 8, 2024

Sure, on it

@paralin
Copy link
Contributor Author

paralin commented Apr 8, 2024

@scottfeldman here is ResolveIPAddr which actually works for some IP addresses, just not those that require accessing /etc/protocols: #24

@paralin
Copy link
Contributor Author

paralin commented Apr 8, 2024

@scottfeldman Here is ResolveUnixAddr: #25

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

2 participants