tonarino / acoustic_profiler

Collaboration project with Jen
MIT License
1 stars 0 forks source link

Use the same family for local as for remote address #32

Closed goodhoko closed 1 year ago

goodhoko commented 1 year ago

To construct a socket it must be first bound to a local address and only then it can connect to a remote address.

For the connection to succeed both addresses must be of the same family (IPv4 or 6).

When constructing the client first parse the given server address to determine its family and then bind to a wildcard address of the same family.

fixes #27