/* anet.c -- Basic TCP socket stuff made a bit less boring
*
- * Copyright (c) 2006-2009, Salvatore Sanfilippo <antirez at gmail dot com>
+ * Copyright (c) 2006-2010, Salvatore Sanfilippo <antirez at gmail dot com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include "fmacros.h"
+
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
close(s);
return ANET_ERR;
}
- if (listen(s, 32) == -1) {
+ if (listen(s, 511) == -1) { /* the magic 511 constant is from nginx */
anetSetError(err, "listen: %s\n", strerror(errno));
close(s);
return ANET_ERR;