face: use async_wait operation instead of async_read with null_buffers
Change-Id: I2914e7f8fbd1b9a9e1fa8113d53700e7d6184464
This commit is contained in:
1 parent
9bf64cc60d
commit
1e0c88e184
2 files changed
+5
-5
No files matched your search
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user