- * Establishes a client connection to a server using the "Peer"
- * field of GSocket. "Peer" must be set by GSocket_SetPeer() before
- * GSocket_Connect() is called. Possible error codes are GSOCK_INVSOCK,
- * GSOCK_INVADDR, GSOCK_TIMEDOUT, GSOCK_WOULDBLOCK and GSOCK_IOERR.
- * If a socket is nonblocking and Connect() returns GSOCK_WOULDBLOCK,
- * the connection request can be completed later. Use GSocket_Select()
- * to check it, or wait for a GSOCK_CONNECTION event.
+ * For stream (connection oriented) sockets, GSocket_Connect() tries
+ * to establish a client connection to a server using the peer address
+ * as established with GSocket_SetPeer(). Returns GSOCK_NOERROR if the
+ * connection has been succesfully established, or one of the error
+ * codes listed below. Note that for nonblocking sockets, a return
+ * value of GSOCK_WOULDBLOCK doesn't mean a failure. The connection
+ * request can be completed later; you should use GSocket_Select()
+ * to poll for GSOCK_CONNECTION | GSOCK_LOST, or wait for the
+ * corresponding asynchronous events.
+ *
+ * For datagram (non connection oriented) sockets, GSocket_Connect()
+ * just sets the peer address established with GSocket_SetPeer() as
+ * default destination.
+ *
+ * Error codes:
+ * GSOCK_INVSOCK - the socket is in use or not valid.
+ * GSOCK_INVADDR - the peer address has not been established.
+ * GSOCK_TIMEDOUT - timeout, the connection failed.
+ * GSOCK_WOULDBLOCK - connection in progress (nonblocking sockets only)
+ * GSOCK_MEMERR - couldn't allocate memory.
+ * GSOCK_IOERR - low-level error.