Skip to content

Commit

Permalink
face: use async_wait operation instead of async_read with null_buffers
Browse files Browse the repository at this point in the history
Change-Id: I2914e7f8fbd1b9a9e1fa8113d53700e7d6184464
  • Loading branch information
Pesa committed Oct 5, 2023
1 parent 9bf64cc commit 1e0c88e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions daemon/face/ethernet-channel.cpp
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions daemon/face/ethernet-transport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1e0c88e

Please sign in to comment.