5 #define _POSIX_C_SOURCE 200809L
7 #include <sys/socket.h>
10 #pragma RcB2 DEP "server.c"
12 union sockaddr_union
{
13 struct sockaddr_in v4
;
14 struct sockaddr_in6 v6
;
18 union sockaddr_union addr
;
23 union sockaddr_union bindaddr
;
28 int resolve(const char *host
, unsigned short port
, struct addrinfo
** addr
);
29 int server_bindtoip(const struct server
*server
, int fd
);
30 int server_waitclient(struct server
*server
, struct client
* client
);
31 int server_setup(struct server
*server
, const char* listenip
, unsigned short port
);