Project

General

Profile

Actions

Bug #1256

closed

EncodingBuffer::block throws if estimated size is not exact

Added by Junxiao Shi over 11 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

// g++ encoding-buffer.cpp -lndn-cpp-dev -pthread -lboost_system -lboost_filesystem -lcrypto -lcryptopp -lsqlite3

#include <ndn-cpp-dev/encoding/block.hpp>
#include <ndn-cpp-dev/encoding/encoding-buffer.hpp>

int
main()
{
  uint8_t value[4];

  ndn::EncodingBuffer blk;
  size_t length = blk.prependByteArray(value, sizeof(value));
  blk.prependVarNumber(length);
  blk.prependVarNumber(0xe0);

  blk.block();
}
Actions #1

Updated by Alex Afanasyev over 11 years ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF