Abstract Message Protocol codec and streaming parser in C.
This repository is not a fork of node-amp ! It has the same behavior but it is a complete library written in C in order to be portable and used in various applications.
Build libamp.so
with the following commands:
mkdir build
cd build
cmake ..
make
Install libamp.so
with the following commands:
make install
This library is compatible with node-amp release 0.3.1.
Build examples with the following commands:
mkdir build
cd build
cmake -DENABLE_AMP_EXAMPLES=ON ..
make
Initialize an empty message.
Add a new field data
of type type
and size size
to the AMP message.
Encode AMP message to buf
. Size of the output is provided with size
.
Decode AMP message from buf
os size size
.
Return the number of fields in the AMP message.
Get first field of the AMP message.
Get next field of the AMP message.
Release internal memory. Must be called to free ressources.
MIT