Commit Graph

203 Commits

Author SHA1 Message Date
Max Kellermann
bbc82a9892 io/FileDescriptor, net/SocketDescriptor: make lots of methods "const"
Only the file descriptor value itself is const, but the file itself
may be readable/writable.
2022-11-09 19:19:20 +01:00
Max Kellermann
cc0def15c4 Copyright year 2022 2022-07-14 17:59:35 +02:00
Max Kellermann
2ba092711f event/net/UdpListener: use IsSocketErrorReceiveWouldBlock() 2022-06-30 10:32:25 +02:00
Max Kellermann
8aa4227c0c net/SocketAddress: add std::span cast operators 2022-06-30 10:30:54 +02:00
Max Kellermann
bc3415ce8b Copyright year 2022 2022-06-30 09:41:53 +02:00
Max Kellermann
12d67dad35 net/SocketError: support ETIMEDOUT 2022-06-29 17:28:47 +02:00
Max Kellermann
f2cfa3e1c4 net/SocketError: add SocketErrorCategory() 2022-06-13 21:26:58 +02:00
Max Kellermann
eedd490e2d net/AddressInfo: add iterator type aliases 2022-06-07 10:11:26 +02:00
Max Kellermann
d2983b7fde net/SocketAddress: include cleanup 2022-05-31 13:54:19 +02:00
Max Kellermann
059955a48c net/SocketAddress: add #ifdefs for std::span 2022-05-31 13:51:12 +02:00
Max Kellermann
6ebac6a0b2 net/StaticSocketAddress: use std::string_view instead of StringView 2022-05-31 13:49:18 +02:00
Max Kellermann
b5a9d0654e net/Resolver: use std::copy() 2022-05-31 13:44:25 +02:00
Max Kellermann
242ba727b2 net/HostParser: use std::string_view instead of StringView 2022-05-31 13:44:25 +02:00
Max Kellermann
d5db4ca0e7 net/SocketAddress: GetSteadyPart() returns std::span 2022-05-31 13:32:27 +02:00
Max Kellermann
774024a41b net/SocketAddress: add std::span cast operator 2022-05-19 20:52:48 +02:00
Max Kellermann
601e5e6abc net/AddressInfo: add noexcept 2022-04-26 21:17:01 +02:00
dgcampea
4f3828237a
Fix DSCP LE value
Correct value is 0x04 since we need to account for the 2 ECN bits.
2022-02-02 16:29:01 +00:00
Max Kellermann
16f7ec9950 net/DscpParser: new library 2022-01-11 20:31:52 +01:00
Max Kellermann
089a843abd net/SocketDescriptor: add method SetIntOption() 2022-01-10 21:36:15 +01:00
Max Kellermann
c30466b84a net/IPv4Address: add method GetPortBE() 2021-11-26 16:25:43 +01:00
Max Kellermann
868f1a4431 net/UniqueSocketDescriptor, ...: include <utility> instead of <algorithm>
Since C++11, std::swap() lives in <utility>.
2021-11-26 16:25:29 +01:00
Rosen Penev
94b0baceb0 convert address_family_ranking to std::array
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-11-11 01:27:31 -08:00
Max Kellermann
77d74b404e Permission: add option "host_permissions"
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1115
2021-10-14 14:44:18 +02:00
Max Kellermann
f510564d9d more [[gnu::...]] attributes 2021-10-13 12:07:05 +02:00
Max Kellermann
b394d8d059 net/Resolver: include cleanup 2021-10-13 11:06:10 +02:00
Max Kellermann
4a1c231734 net/SocketError: use constexpr 2021-04-06 13:59:58 +02:00
Max Kellermann
fd0e958e95 net/SocketError: use auto 2021-04-06 13:58:46 +02:00
Max Kellermann
3d814115c8 net/SocketError: change "const" to "pure" 2021-04-06 13:58:32 +02:00
Max Kellermann
3456b1e50d use std::size_t 2021-02-12 18:39:28 +01:00
Max Kellermann
6cdb3ff21e use [[gnu::pure]] instead of gcc_pure
This is semi-standard and doesn't require the util/Compiler.h header.
2021-02-12 18:34:16 +01:00
Max Kellermann
d56a51cb5e Merge branch 'v0.22.x' 2021-01-21 22:28:11 +01:00
Max Kellermann
9e2d09dabc net/SocketError: add syscall specific check functions
Fixes Windows compatibility.
2021-01-21 22:05:21 +01:00
Max Kellermann
2719f62feb net/SocketError: relicense to BSD-2 2021-01-21 21:31:02 +01:00
Max Kellermann
bcb7e954e9 net/Resolver: add simple getaddrinfo() wrapper 2021-01-12 15:43:26 +01:00
Max Kellermann
866c87c65e net/ToString: include cleanup 2021-01-12 12:22:44 +01:00
Max Kellermann
4ba36d7cb9 net/SocketError: relicense to BSD-2 2021-01-11 22:31:46 +01:00
Max Kellermann
abbd980671 Merge branch 'v0.22.x' 2021-01-01 19:59:15 +01:00
Max Kellermann
5348f8c9c8 copyright year 2021 2021-01-01 19:54:28 +01:00
Max Kellermann
273771ffec net/SocketAddress: add CastTo() 2020-11-30 21:51:07 +01:00
Max Kellermann
32ce9ce919 net/IPv[46]Address: pass SocketAddress by value to Cast() 2020-11-30 21:49:07 +01:00
Max Kellermann
34a070f5a6 net/IPv[46]Address: add Cast(const sockaddr_in&) 2020-11-30 21:49:02 +01:00
Max Kellermann
0ecc3394c3 Merge branch 'v0.22.x' into master 2020-10-15 20:14:36 +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
ed3d8222d6 net/SocketAddress: include cleanup 2020-10-15 15:01:19 +02:00
Max Kellermann
6825e1144e net/SocketError: work around -Wvla by defining a constexpr variable 2020-09-22 20:40:53 +02:00
Rosen Penev
821d08999a
remove GCC5 hacks
GCC5 cannot build mpd.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-09-16 18:10:27 -07:00
Max Kellermann
dbdf782e59 net/{Resolver,HostParser}: include <cstring>
Fixup after e4dad42ca1
2020-07-23 17:40:29 +02:00
Max Kellermann
f102cbb613 net/AllocatedSocketAddress: add missing forward declaration 2020-07-23 17:40:29 +02:00
Max Kellermann
5522967286 net/StaticSocketAddress: add IWYU pragma 2020-07-23 17:40:29 +02:00