aboutsummaryrefslogtreecommitdiffstats
path: root/src/event/ServerSocket.cxx (unfollow)
Commit message (Collapse)AuthorFilesLines
2015-07-22event/ServerSocket: use AllocatedSocketAddress to build local socket addressMax Kellermann1-13/+4
2015-07-22event/ServerSocket: use AllocatedSocketAddress for OneServerSocket::addressMax Kellermann1-9/+14
Manages memory automatically.
2015-07-22net/StaticSocketAddress: replace cast operator with GetAddress()Max Kellermann1-2/+2
The implicit cast operator can be very dangerous.
2015-07-22net/ToString: rename sockaddr_to_string() to ToString()Max Kellermann1-1/+1
2015-07-22net/Resolver: move sockaddr_to_string() to ToString.cxxMax Kellermann1-0/+1
2015-03-05event/ServerSocket: #ifdef out local socket support on WindowsMax Kellermann1-0/+8
2015-02-13net/StaticSocketAdress: new class wrapping struct sockaddr_storageMax Kellermann1-7/+11
2015-02-10net/SocketAddress: light wrapper for struct sockaddrMax Kellermann1-22/+21
2015-02-10system/{Resolver,Socket{Error,Util}}: move to new library libnet.aMax Kellermann1-3/+3
2015-02-10event/ServerSocket: remove obsolete macro DEFAULT_PORTMax Kellermann1-2/+0
2015-01-01Copyright year 2015Max Kellermann1-1/+1
2014-12-04playlist, InotifySource, ...: update GLib commentsMax Kellermann1-1/+1
2014-11-18event/ServerSocket: fix get_remote_uid() error valueMax Kellermann1-1/+1
Must return -1 on error, not 0. 0 is root.
2014-03-15configure.ac: always define _GNU_SOURCE on LinuxMax Kellermann1-5/+0
Make sure glibc gives us all features.
2014-01-13copyright year 2014Max Kellermann1-1/+1
2014-01-07util/Alloc: new library replacing GLib's g_malloc()Max Kellermann1-4/+3
2014-01-06event/SocketMonitor: don't close the socket automaticallyMax Kellermann1-0/+3
Users now have to call Close() explicitly. This simplifies using the class, as most users have automatic socket management already, and Steal() had to be used often.
2013-12-04system/Resolver: sockaddr_to_string() returns std::string()Max Kellermann1-22/+11
No GLib memory allocation.
2013-11-28include cleanup using iwyuMax Kellermann1-0/+1
2013-11-04event/ServerSocket: don't abort if IPv6 is not availableMax Kellermann1-1/+19
First check if an IPv6 socket can be created.
2013-11-04event/ServerSocket: fix assertion failureMax Kellermann1-1/+1
Regression from previous commit. D'oh!
2013-11-04event/ServerSocket: open sockets in the order they were configuredMax Kellermann1-3/+3
Use a std::list which can be appended at the end.
2013-10-19event/ServerSocket: pass AllocatedPath to AddPath()Max Kellermann1-13/+16
2013-10-02Log: new logging library APIMax Kellermann1-11/+12
Prepare to migrate away from GLib. Currently, we're still using GLib as a backend.
2013-09-04system/SocketError: un-inline constructorMax Kellermann1-0/+2
Reduces header dependencies.
2013-09-04util/Error: new error passing libraryMax Kellermann1-41/+35
Replaces GLib's GError.
2013-09-04system/resolver: convert to C++Max Kellermann1-1/+1
2013-08-07Makefile.am: move sources to libsystem.aMax Kellermann1-4/+4
2013-02-04event/ServerSocket: close only sockets that have been openedMax Kellermann1-1/+3
Fixes assertion failure.
2013-02-04ServerSocket: Initialize length variableUli Schlachter1-1/+1
2013-01-30ServerSocket: replace callback with virtual methodMax Kellermann1-12/+7
2013-01-30ServerSocket: expose the classMax Kellermann1-103/+59
Eliminate the C wrappers.
2013-01-30ServerSocket: move to libevent.aMax Kellermann1-0/+0
2013-01-30event/SocketMonitor: OnSocketReady() returns boolMax Kellermann1-2/+3
2013-01-15ServerSocket: use the SocketMonitor classMax Kellermann1-50/+28
2013-01-15ServerSocket: move more code to methodsMax Kellermann1-19/+30
2013-01-15ServerSocket, SocketUtil: use the SocketError libraryMax Kellermann1-7/+9
Use WinSock errors on Windows.
2013-01-15socket_util: convert to C++Max Kellermann1-1/+1
2013-01-15server_socket: convert to C++Max Kellermann1-135/+145
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