aboutsummaryrefslogtreecommitdiffstats
path: root/src/server_socket.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2013-01-15server_socket: convert to C++Max Kellermann1-483/+0
2012-07-10require GLib 2.16Max Kellermann1-1/+0
GLib 2.16 was released more than 4 years ago. Let's remove some cruft from the glib_compat.h header, and avoid new cruft to it.
2012-02-13server_socket: add method _add_fd()Max Kellermann1-0/+30
2012-02-13server_socket: move code to set_fd()Max Kellermann1-8/+21
2011-10-13configure.ac: define WINVERMax Kellermann1-1/+0
Ensure that WINVER is defined early enough, so other system headers won't fall back to their default value. Specifically, this solves a build failure (-Werror) with mingw-w64 ("WINVER redefined").
2011-10-09don't define WINVER in *.c filesMax Kellermann1-1/+0
In a C file, that is too late, because _mingw.h defaults to 0x0502, and ours would be illegal redefintion.
2011-09-20server_socket: use resolve_host_port() instead of getaddrinfo()Max Kellermann1-17/+4
Allow port specification in "bind_to_address" settings.
2011-09-20socket_util: move sockaddr_to_string() to resolver.cMax Kellermann1-0/+1
2011-09-20fd_util: add function close_socket()Max Kellermann1-1/+1
Wrap close(), use closesocket() on WIN32/WinSock.
2011-09-20glib_socket.h: wrap g_io_channel_*_new() calls portablyMax Kellermann1-1/+2
The server_socket library (used by the httpd output plugin) didn't check for WIN32, that's fixed now.
2011-09-19Set socket TCP keepalive option on incoming connectionsDan McGee1-2/+6
If a connected host disappears without our knowledge, as can happen over wireless or a hibernating machine, we continue to hold the port open waiting for messages. Because we never try to send anything down this now-broken pipe, the connection will sit idle taking up a slot in our allowed incoming connections list. If enough of these happen, an unintended Denial of Service takes place, where all connection slots are filled with now-broken, never ending connections. Setting the TCP keepalive option at least allows these to time out after the default two hours, which is sufficient in the non-malicious case. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-29copyright year 2011Max Kellermann1-1/+1
2010-12-27Build fix for Linux. Define _GNU_SOURCE in src/server_socket.c.Ben Kibbey1-0/+5
2010-11-04server_socket: remove AI_ADDRCONFIGMantas Mikulenas1-3/+0
When you pass the flag AI_ADDRCONFIG to getaddrinfo(), it does not consider address families on the loopback device. When run on a machine without an external network card, just with "lo", it was unable to look up any address.
2010-10-05listen: move generic code to server_socket.cMax Kellermann1-0/+447