]> jfr.im git - irc/gameservirc.git/blame - gameserv/sockhelp.h
Updated the TODO list to reflect changes
[irc/gameservirc.git] / gameserv / sockhelp.h
CommitLineData
85ce9d3e 1/*
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.
7 *
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.
10 *
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/.
13 */
14
15#ifndef _SOCKHELP_H_
16#define _SOCKHELP_H_
17
9d057db5 18
85ce9d3e 19#include <signal.h>
20#include <stdio.h>
21#include <stdlib.h>
22#include <string.h>
23#include <sys/types.h>
24#include <sys/socket.h>
25#include <errno.h>
26#include <unistd.h>
27#include <netinet/in.h>
28#include <limits.h>
29#include <netdb.h>
30#include <arpa/inet.h>
31
32int atoport( char *service, char *proto);
33struct in_addr *atoaddr(char *address);
34int get_connection(int socket_type, u_short port, int *listener);
35int make_connection(char *service, int type, char *netaddress);
36int sock_read(int sockfd, char *buf, size_t count);
37int sock_write(int sockfd, const char *buf, size_t count);
38int sock_gets( int sockfd, char *str, size_t count );
39int sock_puts(int sockfd, const char *str);
285f72cf 40int conn(const char *host, int port, const char *lhost, int lport);
85ce9d3e 41void ignore_pipe(void);
42
43#endif
44