Send message to a worker
This commit is contained in:
@@ -166,17 +166,22 @@ int main(int argc, char **argv) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// reply addr
|
// reply id
|
||||||
zmsg_pop(msg);
|
char *id = zmsg_popstr(msg);
|
||||||
// null frame
|
// null frame
|
||||||
zmsg_pop(msg);
|
zmsg_pop(msg);
|
||||||
struct guestfs_inpsect_command *c = guestfs_inspect_zmsg_to_command(msg);
|
struct guestfs_inpsect_command *c = guestfs_inspect_zmsg_to_command(msg);
|
||||||
|
|
||||||
if (STREQ(name, c->name)) {
|
if (STREQ(name, c->name)) {
|
||||||
|
// send request to worker
|
||||||
printf("name equal\n");
|
printf("name equal\n");
|
||||||
|
zactor_send(worker, &msg);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
printf("name not equal\n");
|
printf("name not equal\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* zmsg_t *reply = zmsg_recv(frontend); */
|
||||||
}
|
}
|
||||||
|
|
||||||
zactor_destroy(&worker);
|
zactor_destroy(&worker);
|
||||||
|
|||||||
Reference in New Issue
Block a user