apportate/src/connect.h

12 lines
877 B
C

/* dial -- open a TCP/IP connection to fqdn over port proto (or the port that */
/* corresponds to it, according to /etc/services) */
/* */
/* fqdn -- character string containing the FQDN of the fqdn we're connecting to */
/* proto -- character string containing either a numeric port spec or a human */
/* readable protocol specification, such as "http" */
/* return values */
/* sd -- successful connection returns a file descriptor connected to the fqdn */
/* ERRCONN -- couldn't connect */
/* ERRADDR -- couldn't get addrinfo */
int dial(const char *fqdn, const char *proto);