Listen on all addresses
parent
5cca544e59
commit
d25c063a04
|
@ -28,7 +28,7 @@ static int build_addr_info(int port, struct addrinfo **info) {
|
|||
char *port_string = malloc((port_length + 1) * sizeof(char));
|
||||
sprintf(port_string, "%d", port);
|
||||
|
||||
int addr_status = getaddrinfo(NULL, port_string, &hints, info);
|
||||
int addr_status = getaddrinfo(LISTEN_ADDR, port_string, &hints, info);
|
||||
free(port_string);
|
||||
|
||||
return addr_status;
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include "../common/socket_helper.h"
|
||||
|
||||
#define LISTEN_ADDR "::"
|
||||
#define BACKLOG_SIZE 8
|
||||
#define HTTP_VERSION "HTTP/1.1"
|
||||
#define FILE_BUFFER_SIZE 1024
|
||||
|
|
Loading…
Reference in New Issue