This commit is contained in:
2025-03-11 19:37:36 +06:00
parent e190c79d00
commit 1710eb974d
10 changed files with 178 additions and 64 deletions

View File

@@ -120,10 +120,18 @@ coro<> AsyncSocket::read(std::byte *data, uint32_t size) {
void AsyncSocket::closeRead() {
if(Socket.is_open() && !ReadShutdowned) {
ReadShutdowned = true;
// TODO:
try { Socket.shutdown(boost::asio::socket_base::shutdown_receive); } catch(...) {}
}
}
void AsyncSocket::close() {
if(Socket.is_open()) {
Socket.close();
ReadShutdowned = true;
}
}
coro<> AsyncSocket::waitForSend() {
asio::deadline_timer waiter(IOC);