Skip to content
/ amp Public
forked from clibs/amp

Abstract Message Protocol C implementation

Notifications You must be signed in to change notification settings

01BTC10/amp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AMP

C implementation of the uber simple AMP protocol.

Example

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);
}

Implementations

  • c: this library (~10m ops/s)
  • node ~(1.5m ops/s)

License

MIT

About

Abstract Message Protocol C implementation

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 96.6%
  • Makefile 3.4%