face: use std::array in UdpChannel
Change-Id: I9dc209ef471601f73ae85a36a317d7abf7c1849d
diff --git a/daemon/face/udp-channel.cpp b/daemon/face/udp-channel.cpp
index e1bcd35..dfbfefc 100644
--- a/daemon/face/udp-channel.cpp
+++ b/daemon/face/udp-channel.cpp
@@ -91,8 +91,7 @@
UdpChannel::waitForNewPeer(const FaceCreatedCallback& onFaceCreated,
const FaceCreationFailedCallback& onReceiveFailed)
{
- m_socket.async_receive_from(boost::asio::buffer(m_inputBuffer, ndn::MAX_NDN_PACKET_SIZE),
- m_remoteEndpoint,
+ m_socket.async_receive_from(boost::asio::buffer(m_receiveBuffer), m_remoteEndpoint,
bind(&UdpChannel::handleNewPeer, this,
boost::asio::placeholders::error,
boost::asio::placeholders::bytes_transferred,
@@ -133,7 +132,7 @@
// dispatch the datagram to the face for processing
auto* transport = static_cast<UnicastUdpTransport*>(face->getTransport());
- transport->receiveDatagram(m_inputBuffer, nBytesReceived, error);
+ transport->receiveDatagram(m_receiveBuffer.data(), nBytesReceived, error);
waitForNewPeer(onFaceCreated, onReceiveFailed);
}