move sockaddr_union to sock.h

This commit is contained in:
rofl0r authored and rofl0r committed 2019-12-21 00:43:45 +00:00
1 parent fa2ad0cf9a
commit 82e10935d2
2 files changed
+6 -5

No files matched your search

-5
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;
+6
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);