From 84b3f43a97da2b305cfa5c620aceec543168f6bc Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Thu, 18 Apr 2019 01:58:02 +0200 Subject: Split functions into different files --- sockets.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 sockets.h (limited to 'sockets.h') diff --git a/sockets.h b/sockets.h new file mode 100644 index 0000000..3c8fcbf --- /dev/null +++ b/sockets.h @@ -0,0 +1,29 @@ +#ifndef SOCKETS_H_INCLUDED +#define SOCKETS_H_INCLUDED + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define BACKLOG 10 // maximum length to which the queue of pending connections for sockfd may grow + +#define BOUNCERLISTENPORT "1234" // TODO: change this to a config option! + +// get sockaddr, IPv4 or IPv6: +void *get_in_addr(struct sockaddr *sa); + +// Create socket to connect to real IRC server +int createserversocket(char *host, char *port); + +// Create listening socket to listen for bouncer client connections +int createclientsocket(char *listenport); + +#endif -- cgit v1.2.3