mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
stand alone skynet without skynet-master
This commit is contained in:
17
master/main.c
Normal file
17
master/main.c
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user