diff --git a/daemon/face/ethernet-channel.cpp b/daemon/face/ethernet-channel.cpp index 4d0adc32..c07d6f8e 100644 --- a/daemon/face/ethernet-channel.cpp +++ b/daemon/face/ethernet-channel.cpp @@ -1,6 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* - * Copyright (c) 2014-2022, Regents of the University of California, + * Copyright (c) 2014-2023, Regents of the University of California, * Arizona Board of Regents, * Colorado State University, * University Pierre & Marie Curie, Sorbonne University, @@ -101,8 +101,8 @@ void EthernetChannel::asyncRead(const FaceCreatedCallback& onFaceCreated, const FaceCreationFailedCallback& onReceiveFailed) { - m_socket.async_read_some(boost::asio::null_buffers(), - [=] (const auto& e, auto) { this->handleRead(e, onFaceCreated, onReceiveFailed); }); + m_socket.async_wait(boost::asio::posix::stream_descriptor::wait_read, + [=] (const auto& e) { this->handleRead(e, onFaceCreated, onReceiveFailed); }); } void diff --git a/daemon/face/ethernet-transport.cpp b/daemon/face/ethernet-transport.cpp index a76b0b60..bc496d66 100644 --- a/daemon/face/ethernet-transport.cpp +++ b/daemon/face/ethernet-transport.cpp @@ -147,8 +147,8 @@ EthernetTransport::sendPacket(const ndn::Block& block) void EthernetTransport::asyncRead() { - m_socket.async_read_some(boost::asio::null_buffers(), - [this] (const auto& e, auto) { this->handleRead(e); }); + m_socket.async_wait(boost::asio::posix::stream_descriptor::wait_read, + [this] (const auto& e) { this->handleRead(e); }); } void