GetAutoBindPort returns the bind port that was automatically given by the kernel, if a bind port of 0 was given.
()
| 386 | // GetAutoBindPort returns the bind port that was automatically given by the |
| 387 | // kernel, if a bind port of 0 was given. |
| 388 | func (t *TCPTransport) GetAutoBindPort() int { |
| 389 | // We made sure there's at least one TCP listener, and that one's |
| 390 | // port was applied to all the others for the dynamic bind case. |
| 391 | return t.tcpListeners[0].Addr().(*net.TCPAddr).Port |
| 392 | } |
| 393 | |
| 394 | // FinalAdvertiseAddr is given the user's configured values (which |
| 395 | // might be empty) and returns the desired IP and port to advertise to |
no outgoing calls