mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 12:20:41 +00:00
local cast
This commit is contained in:
@@ -213,7 +213,7 @@ skynet_multicast_castgroup(struct skynet_context * from, struct skynet_multicast
|
||||
}
|
||||
|
||||
void
|
||||
skynet_multicast_cast(struct skynet_context * from, struct skynet_multicast_message *msg, uint32_t *dests, int n) {
|
||||
skynet_multicast_cast(struct skynet_context * from, struct skynet_multicast_message *msg, const uint32_t *dests, int n) {
|
||||
uint32_t source = skynet_context_handle(from);
|
||||
skynet_multicast_copy(msg, n);
|
||||
int i;
|
||||
|
||||
@@ -13,7 +13,7 @@ typedef void (*skynet_multicast_func)(void *ud, uint32_t source, const void * ms
|
||||
struct skynet_multicast_message * skynet_multicast_create(const void * msg, size_t sz, uint32_t source);
|
||||
void skynet_multicast_copy(struct skynet_multicast_message *, int copy);
|
||||
void skynet_multicast_dispatch(struct skynet_multicast_message * msg, void * ud, skynet_multicast_func func);
|
||||
void skynet_multicast_cast(struct skynet_context * from, struct skynet_multicast_message *msg, uint32_t *dests, int n);
|
||||
void skynet_multicast_cast(struct skynet_context * from, struct skynet_multicast_message *msg, const uint32_t *dests, int n);
|
||||
|
||||
struct skynet_multicast_group * skynet_multicast_newgroup();
|
||||
void skynet_multicast_deletegroup(struct skynet_multicast_group * group);
|
||||
|
||||
@@ -118,6 +118,11 @@ skynet_start(struct skynet_config * config) {
|
||||
fprintf(stderr,"launch logger error");
|
||||
exit(1);
|
||||
}
|
||||
ctx = skynet_context_new("localcast", NULL);
|
||||
if (ctx == NULL) {
|
||||
fprintf(stderr,"launch local cast error");
|
||||
exit(1);
|
||||
}
|
||||
ctx = skynet_context_new("snlua", "launcher");
|
||||
if (ctx) {
|
||||
ctx = skynet_context_new("snlua", config->start);
|
||||
|
||||
Reference in New Issue
Block a user