Skip to content

zenwong/mongrel2-test-handlers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Some bare bones handlers for me to learn more about mongrel2.

There are only 2 functions, recv and reply, just setup zmq PULL socket and PUB socket.

int main(int argc, char **argv){
  void *ctx = zmq_init(1);
  void *pull = zmq_socket(ctx, ZMQ_PULL);
  zmq_connect("tcp://*:1111");

  void *pub = zmq_socket(ctx, ZMQ_PUB);
  zmq_connect("tcp://*:1112");

  while(1){
    request *r = receive(pull);

    reply(pub, r, "hello world from handler\n");
  }

  sleep(1);
  return 0;
}


About

just some experiments with mongrel2 handlers in C++/C

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published