Max Kellermann
f8ff597963
event/SocketEvent: document Close()
2020-10-15 16:55:31 +02:00
Max Kellermann
ff6e434caf
event/SocketEvent: rename Steal() to ReleaseSocket()
2020-10-15 16:54:33 +02:00
Max Kellermann
95bb12880d
net/UniqueSocketDescriptor: add noexcept
2020-10-15 16:46:29 +02:00
Max Kellermann
257196664a
net/SocketAddress: add missing include
2020-10-15 16:45:50 +02:00
Max Kellermann
643bf95366
util/OffsetPointer: use std::ptrdiff_t
2020-10-15 16:41:39 +02:00
Max Kellermann
36a187da39
util/Cast: include cleanup
2020-10-15 16:40:26 +02:00
Max Kellermann
fec80f2835
util/Cast: use std::ptrdiff_t
2020-10-15 16:40:18 +02:00
Max Kellermann
4e47653cf6
lib/curl/Global: ignore curl_multi_socket_action() errors
...
Keep the logging library out of this low-level libcurl wrapper.
2020-10-15 16:31:31 +02:00
Max Kellermann
c13004f985
lib/curl/Multi: add Add(), Remove(), ...
2020-10-15 16:25:57 +02:00
Max Kellermann
baba41e304
lib/curl/Global: adjust parameter name
2020-10-15 16:16:02 +02:00
Max Kellermann
d87e09a8b4
lib/dbus/ReadIter: remove obsolete GCC warning workaround
...
We need at least GCC 8 anyway.
2020-10-15 16:08:29 +02:00
Max Kellermann
33146ac353
lib/dbus/Watch: adjust parameter name
2020-10-15 16:06:19 +02:00
Max Kellermann
bb20af8f20
util/StringStrip: use std::strlen()
2020-10-15 12:54:47 +02:00
Max Kellermann
9355ec44e0
util/StringStrip: use std::size_t
2020-10-15 12:53:02 +02:00
Max Kellermann
c63bd323ce
util/StringCompare: use std::memcmp()
2020-10-15 12:48:33 +02:00
Max Kellermann
55db7105c5
event/SocketEvent: check/clear scheduled_flags in Close()
...
Fixes regression by commit 521e573be9
2020-10-14 21:08:39 +02:00
Max Kellermann
1c079e554b
io/UniqueFileDescriptor: add method Release()
2020-10-14 20:50:02 +02:00
Max Kellermann
48afb68f3a
event/SocketEvent: remove assert() from GetScheduledFlags()
...
Fixes regression by commit 7901b04c78
2020-10-14 20:50:02 +02:00
Max Kellermann
21f409d5e2
event/SocketEvent: fix grammar
2020-10-14 16:30:38 +02:00
Max Kellermann
521e573be9
event/SocketEvent: use EventLoop::AbandonFD() in Close()
2020-10-14 16:29:49 +02:00
Max Kellermann
abf9ae2dd9
event/Loop: rename Abandon() to AbandonFD()
2020-10-14 16:26:06 +02:00
Max Kellermann
9f013f7de4
event/SocketEvent: allow Close() without socket
2020-10-14 16:26:01 +02:00
Max Kellermann
7fc04fd5cd
event/SocketEvent: move Dispatch() down
2020-10-14 16:21:41 +02:00
Max Kellermann
7901b04c78
event/SocketEvent: allow Cancel() without socket
2020-10-14 16:20:43 +02:00
Max Kellermann
653eea5840
event/SocketEvent: remove unnecessary initializer
2020-10-14 16:18:39 +02:00
Max Kellermann
5a4055fb08
event/SocketMonitor: refactor to SocketEvent
...
Similar to commits 1686f4e857
and
30a5dd267b
2020-10-14 15:54:12 +02:00
Max Kellermann
4d68a12f03
event/Loop: split the AtScopeExit()
...
Fixes the !HAVE_THREADED_EVENT_LOOP build.
2020-10-14 14:47:59 +02:00
Max Kellermann
0e951da64b
event/Loop: add missing #ifdef
2020-10-14 14:37:29 +02:00
Max Kellermann
38dab040b3
event/Loop: add compile-time option to disable multithreading
...
Not for MPD, but for other applications which might want to copy its
event loop, but do not need multi-threading.
2020-10-14 14:08:38 +02:00
Max Kellermann
e9f6af61f9
event/Loop: forward-declare class {Idle,Defer}Event
2020-10-14 14:05:17 +02:00
Max Kellermann
b06c4e2711
event/{Idle,Defer}Event: use base_hook instead of member_hook
...
Allows forward declaration.
2020-10-14 14:04:30 +02:00
Max Kellermann
1686f4e857
event/IdleMonitor: refactor to IdleEvent
...
Instead of using this as a base class implementing a virtual method,
the new class IdleEvent can be used as a variable, decoupling
IdleMonitor's internal state from the derived class.
This is similar to commit 30a5dd267b
which refactored TimeoutMonitor to TimerEvent.
2020-10-14 13:47:25 +02:00
Max Kellermann
9f57732af2
meson.build: increment version to 0.23~git
...
The new stable branch v0.22.x was forked off and is feature-frozen, so
the "master" branch will become the next major version eventually.
2020-10-14 12:13:12 +02:00
Max Kellermann
329382c1da
event/SignalMonitor: add noexcept
2020-10-13 17:26:33 +02:00
Max Kellermann
fadc03df21
meson.build: move macros to event/Features.h
2020-10-13 16:15:52 +02:00
Max Kellermann
54ee0e28ab
event/PollGroup: check _WIN32 instead of USE_WINSELECT
2020-10-13 15:27:58 +02:00
Max Kellermann
92fc53ebef
event/PollGroupWinSelect: use range-based for
2020-10-12 12:44:23 +02:00
Max Kellermann
7e7a1613cf
event/PollGroupWinSelect: use std::copy_n()
2020-10-12 12:40:32 +02:00
Max Kellermann
f73c4643ef
event/PollGroupWinSelect: move IsEmpty() check to GetPtr()
2020-10-12 12:39:10 +02:00
Max Kellermann
8b94e8f260
event/PollGroupWinSelect: use SOCKET
instead of int
2020-10-12 12:13:46 +02:00
Max Kellermann
41bc17a27f
event/SocketMonitor: add ready_flags
...
By making each SocketMonitor keep track of its ready flags, this
removes a lot of overhead from EventLoop::RemoveFD().
2020-10-09 17:28:11 +02:00
Max Kellermann
41c0bbab13
event/SocketMonitor: don't filter out ERROR/HANGUP
...
By bit-wise ANDing the reported flags with GetScheduledFlags(),
ERROR/HANGUP always get cleared. This means the MPD event loop could
never report those conditions.
2020-10-08 21:16:18 +02:00
Max Kellermann
eeb96eb367
event/TimerEvent: add type alias for std::chrono::steady_clock::duration
2020-10-08 20:48:50 +02:00
Max Kellermann
ce93e58944
event/TimerEvent: use using
instead of typedef
2020-10-08 20:46:18 +02:00
Max Kellermann
263b0ffdbb
event/TimerEvent: use auto_unlink hook
2020-10-08 20:46:15 +02:00
Max Kellermann
22bea5c97e
event/Loop: reorder includes
...
This just happened to break the Windows build because of the
`GetObject` macro in `windows.h`, so I added a kludge to
PollResultGeneric.hxx.
2020-10-08 20:43:21 +02:00
Max Kellermann
75802ebcc6
StateFileConfig, ...: drop obsolete out-of-class definition
2020-10-08 20:38:11 +02:00
Max Kellermann
27cc7b352d
config/Data: cast to std::chrono::steady_clock::duration properly
...
Oh no, 3413d1bf23
was broken! Instead of passing a number as
"seconds" to the duration constructor, it just abused the duration
constructor as cast operator, which caused custom state_file_interval
settings to be extremely short.
2020-10-08 20:30:33 +02:00
Max Kellermann
d64729065e
config/Parser: use std::size_t
2020-10-08 20:26:39 +02:00
Max Kellermann
ab318200db
config/{Data,Block}: use With() in GetUnsigned(), GetPositive()
2020-10-08 20:21:09 +02:00