tass-belgium / picotcp-bsd

BSD POSIX-compliant socket support for PicoTCP running on any OS.
GNU General Public License v2.0
17 stars 21 forks source link

[connect] - EINPROGRESS indicates nonblocking connection started #7

Closed schnommus closed 6 years ago

schnommus commented 6 years ago

picotcp-bsd currently indicates EAGAIN after a connect() for a nonblocking socket is initiated, which is not compatible with some posix libraries. It should instead indicate EINPROGRESS.

From POSIX Programmer's Manual:

EINPROGRESS
              O_NONBLOCK is set for the file descriptor for the socket and the connection cannot be immediately established;  the  connec‐
              tion shall be established asynchronously.

See https://github.com/tass-belgium/picotcp/pull/486 for the PR which adds the error code to picoTCP headers.

jelledevleeschouwer commented 6 years ago

@roel0, @maximevince, can we also merge this? Relates to https://github.com/tass-belgium/picotcp/pull/486