commit | 38cbd57a47684cbf98ec67af170dc7fae4b2c7dd | [log] [tgz] |
---|---|---|
author | Jeff Thompson <jefft0@gmail.com> | Fri Jun 28 14:01:10 2013 -0700 |
committer | Jeff Thompson <jefft0@gmail.com> | Fri Jun 28 14:01:10 2013 -0700 |
tree | 6bf431342d51ffd6a400ede9a414c97f91f4542a | |
parent | 04c0b6a8d0841e47032defef928e2f10a07cf233 [diff] |
Change decodeTypeAndVal to return an error if the first octet is 0.
People often feel confusing and tedious when using CCNx C library, and this is an attempt to make it easier to program NDN applications using C++.
This API remotely resembles PyCCN API if you by any chance have already got yourself familiar with that.
The functions included are be roughly devided into two categories: NDN operations and async operations.
This is a set of functions that provide relative easier ways to perform NDN operations, including manipulating NDN names, content objects, interests, sending interests, callbacks (closure) for content objects, name prefix discovery, signature verifications, etc.. There is also a blocking API to fetch content object.
Communications in NDN is mostly async. There is an event thread running NDN and processing the NDN events (e.g. interests received, expired, content received, etc..). As such, you don't really want to do a lot of processing in the NDN event thread (which blocks processing of that events). Hence we provide a simple executor API, which allows you to process the events in separate threads. We also provide a scheduler which allows you to scheduler various events as you wish. The scheduler is based on libevent C API.
To see more options, use ./waf configure --help
. For default install, use
./waf configure ./waf sudo ./waf install
Normally, default install goes to /usr/local. If you have added /usr/local/lib/pkgconfig to your PKG_CONFIG_PATH
, then you can compile your code like this:
g++ code.cpp `pkg-config --cflags --libs libndn.cxx`
example/ directory contains a fully working example of simple client and server applications written using NDN.cxx API.
There is also an extensive usage of this library in ChronoShare.