apportate/src/connect.h
2022-11-24 04:18:05 -04:00

11 lines
876 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);