I'm writing some code and critical at some point you need to install the TCP-connection using connect()
.
I delve into the POSIX manpages to make sure my code is fully compatible with POSIX and should write unit tests covering all possible cases of errors.
Given this document , I do not understand what the following means:
EADDRINUSE Try to establish a connection that uses addresses that are already in use.
At first glance, I thought that I could be caused by the lack of an ephemeral port, but this error is reported EADDRNOTAVAIL
(which I successfully called in the unit test).
Specifically, what does this mean? What condition can lead to this error? I understand the semantics of the errors bind()
, but can connect()
increase it?
source
share