]>
jfr.im git - irc/gameservirc.git/blob - gameserv/sockhelp.h
2 * This file is provided for use with the unix-socket-faq. It is public
3 * domain, and may be copied freely. There is no copyright on it. The
4 * original work was by Vic Metcalfe (vic@brutus.tlug.org), and any
5 * modifications made to that work were made with the understanding that
6 * the finished work would be in the public domain.
8 * If you have found a bug, please pass it on to me at the above address
9 * acknowledging that there will be no copyright on your work.
11 * The most recent version of this file, and the unix-socket-faq can be
12 * found at http://www.interlog.com/~vic/sock-faq/.
23 #include <sys/types.h>
24 #include <sys/socket.h>
27 #include <netinet/in.h>
30 #include <arpa/inet.h>
32 int atoport( char *service
, char *proto
);
33 struct in_addr
*atoaddr(char *address
);
34 int get_connection(int socket_type
, u_short port
, int *listener
);
35 int make_connection(char *service
, int type
, char *netaddress
);
36 int sock_read(int sockfd
, char *buf
, size_t count
);
37 int sock_write(int sockfd
, const char *buf
, size_t count
);
38 int sock_gets( int sockfd
, char *str
, size_t count
);
39 int sock_puts(int sockfd
, const char *str
);
40 void ignore_pipe(void);