TCP standard has \"simultaneous open\" feature.
The implication of the feature, client trying to connect to local port, when the port is from ephemeral range, can o
For server you need to bind() socket to port. Once addr:port pair had socket bound, it will no longer be used for implicit binding in connect().
No problem, no trouble.