Max Kellermann
3ddc7a5353
event/ServerSocket: include cleanup
2018-10-30 20:19:07 +01:00
Max Kellermann
e575392b94
event/ServerSocket: use class IPv6Address
2018-10-30 20:19:04 +01:00
Max Kellermann
c6f61a699c
event/ServerSocket: make OneServerSocket an inner class
2018-10-30 20:16:26 +01:00
Max Kellermann
0307b49f43
event/ServerSocket: make OnAccept() noexcept
2018-10-30 20:13:07 +01:00
Max Kellermann
413ab80295
event/ServerSocket: use C++11 initializer
2018-10-30 20:11:58 +01:00
Max Kellermann
daffefdb10
event/ServerSocket: pass UniqueSocketDescriptor to AddFD()
2018-10-30 20:05:57 +01:00
Max Kellermann
5fb21fbdb1
event/ServerSocket: add noexcept
2018-10-30 19:57:39 +01:00
Max Kellermann
94592c1406
build with Meson instead of autotools
...
So long, autotools! This is my last MPD related project to migrate
away from it. It has its strengths, but also very obvious weaknesses
and weirdnesses. Today, many of its quirks are not needed anymore,
and are cumbersome and slow. Now welcome our new Meson overlords!
2018-10-14 23:41:38 +02:00
Max Kellermann
dd461400fb
system/EPollFD: rename to EpollFD
2018-08-22 15:40:45 +02:00
Max Kellermann
4a1e885c0a
net/Resolver: replace with more advanced implementation
...
The new implementation is copied from another project and is
BSD-licensed. It is exception-safe and can parse IPv6 scope ids with
interface names.
2018-08-21 08:26:12 +02:00
Max Kellermann
ec54754e22
Compiler.h: move to util/
2018-08-20 16:19:17 +02:00
1848
4797357fa9
fixed setting unix socket permissions
...
first call fchmod() to prevent TOCTTOU, then apply permissions using
chmod()
2018-08-14 22:53:19 +02:00
Max Kellermann
c1b33533da
event/ServerSocket: fix get_remote_uid() call
...
This call was broken since commit
9a5bcc6db0
because the
`UniqueSocketDescriptor` had already been moved.
2018-08-09 13:22:25 +02:00
1848
737267cedc
Moved call to fchmod() on socket from OneServerSocket::Open() to socket_bind_listen()
2018-08-07 22:01:13 +02:00
1848
84054203af
Use fchmod instead of chmod for unix sockets to prevent TOCTTOU
2018-08-07 21:30:25 +02:00
Max Kellermann
7df0d3b7fc
event/SignalMonitor: make SignalMonitorFinish() noexcept
2018-08-06 12:01:46 +02:00
Max Kellermann
fdd101c4c5
event/SignalMonitor: add noexcept
2018-08-06 12:00:49 +02:00
Max Kellermann
dd18fe34a7
system/SignalFD: throw exception on error
2018-08-06 11:58:29 +02:00
Max Kellermann
0c1a001622
system/Event{FD,Pipe}: throw exception on error
2018-08-06 11:49:38 +02:00
Max Kellermann
56bfff5a57
event/ServerSocket: add method IsEmpty()
2018-07-15 21:35:35 +02:00
Max Kellermann
d29d186d62
output/alsa: use a new I/O thread with real-time scheduling
...
The normal I/O event thread can have a large latency, e.g. when
libgnutls loads all TLS CA certificates for a https connect. This
makes it unreliable for the ALSA I/O notifications, and causes ring
buffer xruns. To avoid interfering with high latency events such as
CURL's, we move the ALSA I/O events to a separate I/O thread which
also obtains real-time scheduling (if possible).
Closes #221
2018-02-16 22:38:55 +01:00
Max Kellermann
19af364400
event/Thread: add "noexcept"
2018-01-29 23:11:15 +01:00
Max Kellermann
3fd9a86f3c
event/Call: invoke function directly if the EventLoop is dead
...
Works around a deadlock bug which happens when waiting for an
EventLoop which isn't running anymore.
2018-01-29 23:06:43 +01:00
Max Kellermann
ce68701c0c
event/Loop: add flag "dead"
2018-01-29 22:52:13 +01:00
Max Kellermann
6ea2cb3644
event/Thread: remove unused method StopAsync()
2018-01-29 22:50:21 +01:00
Max Kellermann
199c8aaa25
event/Loop: move code to HandleTimers()
2018-01-29 22:40:12 +01:00
Max Kellermann
3890bc5a96
event/Loop: add "noexcept"
2018-01-29 22:05:58 +01:00
Max Kellermann
2c65f986d6
event/EPoll: use C++11 initializer
2018-01-29 22:05:13 +01:00
Max Kellermann
ea402b765c
event/WinSelect: pass const reference to copy constructor
2018-01-29 22:05:13 +01:00
Max Kellermann
497e0669ff
event/PollResult: use size_t for size and index
2018-01-29 21:56:12 +01:00
Max Kellermann
bbc5212436
fs/AllocatedPath: make the nullptr_t constructor public
2018-01-17 12:17:41 +01:00
Max Kellermann
f8bb66b4e0
event/Loop: use std::atomic_bool for the "quit" variable
...
Fixes thread sanitizer warnings.
2017-12-22 11:04:24 +01:00
Max Kellermann
36899dba0b
event/Call: document exceptions
2017-12-20 10:50:36 +01:00
Max Kellermann
6a31446671
event/TimerEvent: add "noexcept"
2017-12-20 10:45:30 +01:00
Max Kellermann
451fbbcea1
event/FullyBufferedSocket: add "noexcept"
2017-12-20 10:44:47 +01:00
Max Kellermann
a17a481e30
event/BufferedSocket: add "noexcept"
2017-12-20 10:42:17 +01:00
Max Kellermann
914df18bf9
Main, ...: catch any exception, not just std::runtime_error
2017-12-19 10:56:23 +01:00
Max Kellermann
6246d36fe6
Merge branch 'v0.20.x'
2017-12-16 20:56:06 +01:00
Max Kellermann
dfaf08743c
*: check defined(_WIN32) instead of defined(WIN32)
...
Only _WIN32 is defined by the compiler, and WIN32 is not standardized
and may be missing.
Closes #169
2017-12-12 10:22:20 +01:00
Max Kellermann
c582a9faae
event/MultiSocketMonitor: add "noexcept"
2017-11-12 17:42:50 +01:00
Max Kellermann
cf483107c9
event/IdleMonitor: add "noexcept"
2017-11-12 17:40:25 +01:00
Max Kellermann
b57e2f5521
event/DeferredMonitor: eliminate obsolete class
...
Move its code to DeferEvent instead.
2017-11-12 17:34:06 +01:00
Max Kellermann
bf3ced6a34
event/Call: migrate from DeferredMonitor to DeferEvent
2017-11-12 17:32:23 +01:00
Max Kellermann
42ad753e39
event/MaskMonitor: migrate from DeferredMonitor to DeferEvent
2017-11-10 21:10:46 +01:00
Max Kellermann
593d82c6a9
event/DeferEvent: add "noexcept"
2017-11-10 20:55:24 +01:00
Max Kellermann
43dccbd45d
event/SocketMonitor: remove unused method Abandon()
2017-11-10 20:52:37 +01:00
Max Kellermann
0ff4350352
event/ServerSocket: pass UniqueSocketDescriptor by value
...
Passing it by value is actually smaller (32 bit) than the rvalue
reference (64 bit pointer), and it ensures that the object is consumed
after the call returns, no matter how the methods are implemented.
2017-11-10 20:43:14 +01:00
Max Kellermann
5fd2b7cc79
event/SocketMonitor: eliminate Read(), Write()
...
Migrate callers to GetSocket().Read(), GetSocket.Write(), which is the
same.
2017-11-10 20:37:52 +01:00
Max Kellermann
7e16ac305d
event/SocketMonitor: rename Get() to GetSocket()
2017-11-10 20:34:45 +01:00
Max Kellermann
59a8836924
event/SocketMonitor: add "noexcept"
2017-11-10 20:20:07 +01:00