move sockaddr_union to sock.h

This commit is contained in:
rofl0r 2018-12-31 14:24:17 +00:00 committed by rofl0r
parent fa2ad0cf9a
commit 82e10935d2
2 changed files with 6 additions and 5 deletions

View File

@ -36,11 +36,6 @@
static vector_t listen_fds;
union sockaddr_union {
struct sockaddr_in v4;
struct sockaddr_in6 v6;
};
struct client {
union sockaddr_union addr;
int fd;

View File

@ -28,8 +28,14 @@
#define MAXLINE (1024 * 4)
#include "common.h"
#include "vector.h"
union sockaddr_union {
struct sockaddr_in v4;
struct sockaddr_in6 v6;
};
extern int opensock (const char *host, int port, const char *bind_to);
extern int listen_sock (const char *addr, uint16_t port, vector_t listen_fds);