C implementation of the uber simple AMP protocol.
char *args[] = { "some", "stuff", "here" };
// encode
char *buf = amp_encode(args, 3);
// decode header
amp_t msg = {0};
amp_decode(&msg, buf);
assert(1 == msg.version);
assert(3 == msg.argc);
// decode args
for (int i = 0; i < msg.argc; ++i) {
char *arg = amp_decode_arg(&msg);
printf("%d : %s\n", i, arg);
}
- c: this library (~10m ops/s)
- node ~(1.5m ops/s)
MIT