- * Use: Sets up a nonblocking connect job. The source address and
- * port can be zero if you don't care. When the connection
- * completes, the handler function is called with the connected
- * socket as an argument. If the connect fails rather than
- * completes, the handler is informed of this by being passed a
- * negative file descriptor. In either case, the select job is
- * then removed.
+ * Use: Sets up a nonblocking connect job. The socket should have a
+ * connect pending for it already.
+ */
+
+void conn_fd(conn */*c*/, sel_state */*s*/, int /*fd*/,
+ void (*/*func*/)(int /*fd*/, void */*p*/),
+ void */*p*/);
+
+/* --- @conn_init@ --- *
+ *
+ * Arguments: @conn *c@ = pointer to connection block
+ * @sel_state *s@ = pointer to select state to attach to
+ * @int fd@ = file descriptor of socket to connect
+ * @struct sockaddr *dst@ = destination address
+ * @int dsz@ = size of destination address
+ * @void (*func)(int fd, void *p) = handler function
+ * @void *p@ = argument for the handler function
+ *
+ * Returns: Zero on success, nonzero on failure.
+ *
+ * Use: Sets up a nonblocking connect job. The socket should already
+ * be bound if you care about that sort of thing. When the
+ * connection completes, the handler function is called with the
+ * connected socket as an argument. If the connect fails rather
+ * than completes, the socket is closed, and the handler is
+ * informed of this by being passed a negative file descriptor.
+ * In either case, the select job is then removed.