Added EINPROGRESS check in socket_connect for non-blocking client sockets.
Added pre-start check for the destination address to make sure it is connectable (fixes #35).
Computing of total data length in a stack is now done at every write (fixes #34).