Forum Discussion
Altera_Forum
Honored Contributor
12 years agoCan the connect() for a TCP client be configured as "blocking" ?
I'm developing a TCP client using NicheStack. Can the connect() for a TCP client be configured as "blocking" ? Currently, if no server is listening for the connection the connect() returns -...
Altera_Forum
Honored Contributor
12 years agoAfter doing further investigation (using the debugger), the error causing the connect() to return -1 is ECONNREFUSED.
Of course, since there's no server listening for this client that would make sense but since the connect() should be blocked until the server is listening, why is the error ECONNREFUSED ?