Content-type: text/html
mcl_wait_event - wait an event of the MultiCast Library (MCL)
#include "../src/common/mcl_lib_api.h"
int mcl_wait_event (int id, int event);
mcl_wait_event enables the application to sleep until the event specified occurs. It applies to the current session (identified by the id identifier). As this function uses polling, it may not be awaken immediately after that the expected event has occurred.
The arguments are:
The following events are defined:
Using MCL_WAIT_EVENT_CLOSED requires that a MCL_OPT_NEVER_LEAVE_BASE_LAYER (see mcl_ctl(2) manual) has been issued at the session start. Indeed, CLOSE messages are sent on the base layer and without this option the receiver leaves the base layer once all objects have been successfully decoded.
On success returns 0, on error a non-zero value.
Here is a simple example.
int err = 0; if ((err = mcl_wait_event(id, MCL_WAIT_EVENT_END_TX)) < 0) { printf("ERROR: mcl_wait_event failed); exit(-1); }
Copyright (c) 1999-2003 INRIA - Universite Paris 6 - All rights reserved (main author: Vincent Roca - vincent.roca@inrialpes.fr) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
mcl_open(3), MCL documentation
Vincent Roca (INRIA Rhone-Alpes, Planete project)
$Id: mcl_wait_event.man.2,v 1.2 2003/10/27 09:55:47 roca Exp $