Skip to content

Conversation

@fearworksmedia
Copy link
Contributor

…/ CreateListenSocketInternal()

Added RetrieveAddresses() function and modified CreateListenSocket and CreateListenSocketInternal() to include a specified ip address to bind to (by directing getaddrinfo() to look for a specific IP address instead of NULL, which seems to stop at the first default address, which if an IPv6 address, means we cannot create a listen socket if the system is IPv4)

…/ CreateListenSocketInternal()

Added RetrieveAddresses() function and modified CreateListenSocket and CreateListenSocketInternal() to include a specified ip address to bind to (by directing getaddrinfo() to look for a specific IP address instead of NULL, which seems to stop at the first default address, which if an IPv6 address, means we cannot create a listen socket if the system is IPv4)
@fearworksmedia
Copy link
Contributor Author

This is part of a dirty attempt to get a list of IP addresses on the PC and return them (as a string with each IP address on a new line... because I don't know how else to do it), and then be able to specify whichever one of these we choose when creating a listening socket to bind to a specific IP address instead of being at the mercy of whichever one getaddrinfo() finds first. At least I think that's how it works.

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.

1 participant