X-Git-Url: https://git.cworth.org/git?p=ttt;a=blobdiff_plain;f=src%2Fx.h;h=64a18a22c2492d5727379258efb059d4e1d3b2e2;hp=b3384af43d93b37aad0a96523cef97d2f616ab66;hb=95898262b4ce4a2a3d36f70a4e6cc8188decc142;hpb=15672ac8305a1c5ba0d9bf6edabb0a194c30628e diff --git a/src/x.h b/src/x.h index b3384af..64a18a2 100644 --- a/src/x.h +++ b/src/x.h @@ -45,11 +45,14 @@ xcalloc (size_t nmemb, size_t size); void * xrealloc (void *ptr, size_t size); +FILE * +xfopen (const char *path, const char *mode); + FILE * xfdopen (int filedes, const char *mode); void -xfreopen (const char *path, const char *mode, FILE *stream); +xdup2 (int oldfd, int newfd); char * xstrdup (const char *s); @@ -63,6 +66,9 @@ xsocket (int domain, int type, int protocol); void xbind (int sockfd, const struct sockaddr *my_addr, socklen_t addrlen); +ttt_status_t +xconnect (int sockfd, const struct sockaddr *serv_addr, socklen_t addrlen); + void xlisten (int s, int backlog);