move sockaddr_union to sock.h
This commit is contained in:
parent
fa2ad0cf9a
commit
82e10935d2
@ -36,11 +36,6 @@
|
|||||||
|
|
||||||
static vector_t listen_fds;
|
static vector_t listen_fds;
|
||||||
|
|
||||||
union sockaddr_union {
|
|
||||||
struct sockaddr_in v4;
|
|
||||||
struct sockaddr_in6 v6;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct client {
|
struct client {
|
||||||
union sockaddr_union addr;
|
union sockaddr_union addr;
|
||||||
int fd;
|
int fd;
|
||||||
|
@ -28,8 +28,14 @@
|
|||||||
|
|
||||||
#define MAXLINE (1024 * 4)
|
#define MAXLINE (1024 * 4)
|
||||||
|
|
||||||
|
#include "common.h"
|
||||||
#include "vector.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 opensock (const char *host, int port, const char *bind_to);
|
||||||
extern int listen_sock (const char *addr, uint16_t port, vector_t listen_fds);
|
extern int listen_sock (const char *addr, uint16_t port, vector_t listen_fds);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user