#binding TcpSocket to an ip without port

1 messages · Page 1 of 1 (latest)

deft fossil
#

I have multiple ips attached to one interface on my server, and ip a result is attached. I am looking to make outbound tcp connections, and I want to bind it to only an ip, with a system assigned port. TcpSocket::bind requires a full socket address including the port however. How can I bind it in a way to ensure the outgoing request is made using the ip I want?

tranquil warren
#

specify 0 as the port number

deft fossil
#

oh