s/events_loop/wait_event/
parent
8439cc0f18
commit
4c45fb7d12
|
@ -69,7 +69,7 @@ void interactive ()
|
||||||
printf ("msg to send: ");
|
printf ("msg to send: ");
|
||||||
fflush (stdout);
|
fflush (stdout);
|
||||||
|
|
||||||
TEST_IPC_WAIT_EVENT_Q (ipc_events_loop (ctx, &event, &timer), EXIT_FAILURE);
|
TEST_IPC_WAIT_EVENT_Q (ipc_wait_event (ctx, &event, &timer), EXIT_FAILURE);
|
||||||
switch (event.type) {
|
switch (event.type) {
|
||||||
case IPC_EVENT_TYPE_EXTRA_SOCKET:
|
case IPC_EVENT_TYPE_EXTRA_SOCKET:
|
||||||
{
|
{
|
||||||
|
|
|
@ -45,7 +45,7 @@ void main_loop ()
|
||||||
while (1) {
|
while (1) {
|
||||||
// ipc_wait_event provides one event at a time
|
// ipc_wait_event provides one event at a time
|
||||||
// warning: event->m is free'ed if not NULL
|
// warning: event->m is free'ed if not NULL
|
||||||
TEST_IPC_WAIT_EVENT_Q (ipc_events_loop (ctx, &event, &timer), EXIT_FAILURE);
|
TEST_IPC_WAIT_EVENT_Q (ipc_wait_event (ctx, &event, &timer), EXIT_FAILURE);
|
||||||
|
|
||||||
switch (event.type) {
|
switch (event.type) {
|
||||||
case IPC_EVENT_TYPE_CONNECTION:
|
case IPC_EVENT_TYPE_CONNECTION:
|
||||||
|
|
|
@ -62,7 +62,7 @@ void interactive ()
|
||||||
printf ("msg to send: ");
|
printf ("msg to send: ");
|
||||||
fflush (stdout);
|
fflush (stdout);
|
||||||
|
|
||||||
TEST_IPC_WAIT_EVENT_Q (ipc_events_loop (ctx, &event, &timer), EXIT_FAILURE);
|
TEST_IPC_WAIT_EVENT_Q (ipc_wait_event (ctx, &event, &timer), EXIT_FAILURE);
|
||||||
|
|
||||||
switch (event.type) {
|
switch (event.type) {
|
||||||
case IPC_EVENT_TYPE_TIMER:{
|
case IPC_EVENT_TYPE_TIMER:{
|
||||||
|
|
|
@ -165,7 +165,7 @@ void main_loop (int argc, char **argv)
|
||||||
// warning: event->m is free'ed if not NULL
|
// warning: event->m is free'ed if not NULL
|
||||||
|
|
||||||
ipc_ctx_print (ctx);
|
ipc_ctx_print (ctx);
|
||||||
TEST_IPC_WAIT_EVENT_Q (ipc_events_loop (ctx, &event, &timer), EXIT_FAILURE);
|
TEST_IPC_WAIT_EVENT_Q (ipc_wait_event (ctx, &event, &timer), EXIT_FAILURE);
|
||||||
|
|
||||||
switch (event.type) {
|
switch (event.type) {
|
||||||
case IPC_EVENT_TYPE_TIMER:{
|
case IPC_EVENT_TYPE_TIMER:{
|
||||||
|
|
|
@ -23,7 +23,7 @@ int main(int argc, char * argv[])
|
||||||
printf ("func 01 - service polling...\n");
|
printf ("func 01 - service polling...\n");
|
||||||
|
|
||||||
// listen only for a single client
|
// listen only for a single client
|
||||||
TEST_IPC_Q(ipc_events_loop (&ctx, &event, &timer), EXIT_FAILURE);
|
TEST_IPC_Q(ipc_wait_event (&ctx, &event, &timer), EXIT_FAILURE);
|
||||||
|
|
||||||
switch (event.type) {
|
switch (event.type) {
|
||||||
case IPC_EVENT_TYPE_TIMER : {
|
case IPC_EVENT_TYPE_TIMER : {
|
||||||
|
|
|
@ -56,7 +56,7 @@ void interactive ()
|
||||||
while (1) {
|
while (1) {
|
||||||
printf ("msg to send: ");
|
printf ("msg to send: ");
|
||||||
fflush (stdout);
|
fflush (stdout);
|
||||||
TEST_IPC_Q(ipc_events_loop (&ctx, &event, &timer), EXIT_FAILURE);
|
TEST_IPC_Q(ipc_wait_event (&ctx, &event, &timer), EXIT_FAILURE);
|
||||||
|
|
||||||
switch (event.type) {
|
switch (event.type) {
|
||||||
case IPC_EVENT_TYPE_TIMER: {
|
case IPC_EVENT_TYPE_TIMER: {
|
||||||
|
|
|
@ -27,7 +27,7 @@ void main_loop ()
|
||||||
while(1) {
|
while(1) {
|
||||||
// ipc_wait_event provides one event at a time
|
// ipc_wait_event provides one event at a time
|
||||||
// warning: event->m is free'ed if not NULL
|
// warning: event->m is free'ed if not NULL
|
||||||
ret = ipc_events_loop (ctx, &event, &timer);
|
ret = ipc_wait_event (ctx, &event, &timer);
|
||||||
if (ret.error_code != IPC_ERROR_NONE && ret.error_code != IPC_ERROR_CLOSED_RECIPIENT) {
|
if (ret.error_code != IPC_ERROR_NONE && ret.error_code != IPC_ERROR_CLOSED_RECIPIENT) {
|
||||||
PRINTERR(ret,"service poll event");
|
PRINTERR(ret,"service poll event");
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ void read_message (struct ipc_ctx *ctx)
|
||||||
// ctx, index, message
|
// ctx, index, message
|
||||||
TEST_IPC_Q(ipc_read (ctx, 0 /* only one server here */, &m), EXIT_FAILURE);
|
TEST_IPC_Q(ipc_read (ctx, 0 /* only one server here */, &m), EXIT_FAILURE);
|
||||||
|
|
||||||
ipc_events_loop (ctx, &event, &timer);
|
ipc_wait_event (ctx, &event, &timer);
|
||||||
|
|
||||||
switch (event.type) {
|
switch (event.type) {
|
||||||
case IPC_EVENT_TYPE_MESSAGE : {
|
case IPC_EVENT_TYPE_MESSAGE : {
|
||||||
|
|
|
@ -24,7 +24,7 @@ int main_loop(int argc, char * argv[])
|
||||||
printf ("func 01 - service polling...\n");
|
printf ("func 01 - service polling...\n");
|
||||||
// listen only for a single client
|
// listen only for a single client
|
||||||
while (1) {
|
while (1) {
|
||||||
TEST_IPC_WAIT_EVENT_Q (ipc_events_loop (&ctx, &event, &timer), EXIT_FAILURE);
|
TEST_IPC_WAIT_EVENT_Q (ipc_wait_event (&ctx, &event, &timer), EXIT_FAILURE);
|
||||||
|
|
||||||
switch (event.type) {
|
switch (event.type) {
|
||||||
case IPC_EVENT_TYPE_TIMER : {
|
case IPC_EVENT_TYPE_TIMER : {
|
||||||
|
|
Reference in New Issue