Update network facade

This commit is contained in:
sha512sum 2024-04-26 13:44:14 +00:00
parent 1dcaeb470a
commit 1b7899743c

View file

@ -134,9 +134,9 @@ inline constexpr auto AsyncRead(Socket&& socket, Buffer buffer, CompletionCondit
return boost::asio::async_read(std::forward<Socket>(socket).impl, std::move(buffer), std::move(completion), boost::asio::use_awaitable); return boost::asio::async_read(std::forward<Socket>(socket).impl, std::move(buffer), std::move(completion), boost::asio::use_awaitable);
}; };
template <typename Buffer, typename Match> template <typename Socket, typename Buffer, typename Match>
inline constexpr auto AsyncReadUntil(TcpSocket& socket, Buffer buffer, Match match) -> Task<> { inline constexpr auto AsyncReadUntil(Socket&& socket, Buffer buffer, Match match) -> Task<> {
return boost::asio::async_read_until(socket.impl, std::move(buffer), std::move(match), boost::asio::use_awaitable); return boost::asio::async_read_until(std::forward<Socket>(socket).impl, std::move(buffer), std::move(match), boost::asio::use_awaitable);
}; };
inline constexpr auto TransferAll() { inline constexpr auto TransferAll() {