stand alone skynet without skynet-master

This commit is contained in:
云风
2012-08-08 13:30:59 +08:00
parent 2dc7bec040
commit 7aee6b66d1
12 changed files with 84 additions and 27 deletions

17
master/main.c Normal file
View File

@@ -0,0 +1,17 @@
#include "skynet_master.h"
#include <zmq.h>
int
main (int argc, char * argv[]) {
const char * default_port = "tcp://127.0.0.1:2012";
if (argc > 1) {
default_port = argv[2];
}
void *context = zmq_init (1);
skynet_master(context, default_port);
zmq_term (context);
return 0;
}