|o||0, to indicate that the connection succeeded (and succeeded immediately, if the socket is non-blocking)|
|o||-1, setting errno to error_inprogress or error_wouldblock, to indicate that the socket is non-blocking|
|o||-1, setting errno to something else, to indicate that the connection failed (and failed immediately, if the socket is non-blocking).|
When a background connection succeeds or fails, s becomes writable; you can use socket_connected to see whether the connection succeeded. If the connection failed, socket_connected returns 0, setting errno appropriately.
Once a TCP socket is connected, you can use the read and write system calls to transmit data.
You can call socket_connect6 without calling socket_bind6. This has the effect as first calling socket_bind6 with IP address :: and port 0.
s = socket_tcp6();