Content-type: text/html
mcl_send - mcl_sendto - send data to an MCL (MultiCast Library) session
#include "../src/common/mcl_lib_api.h"
int mcl_send (int id, const void *buf, int buflen);
int mcl_sendto (int id, const void *buf, int buflen, const struct sockaddr *saddr, int saddr_len);
Sends data on an MCL session, specifying the destination address in case of the mcl_sendto call. These two calls are non blocking (asynchronous).
Calling mcl_send() or mcl_sendto() with an identifier that does not refer to an MCL session leads to calling the send() or sendto() system call.
Returns the number of bytes sent on success, or a negative (< 0) value in case of error.
Note that issuing an mcl_send() or mcl_sendto() on a session that is closed by the source triggers an error.
Here is a simple example (sending side):
int id; int len; char buf[BUFLEN]; if (mcl_send(id, buf, BUFLEN) < 0) printf("ERROR: mcl_send 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 documentation, send() or sendto() man pages
Vincent Roca (INRIA Rhone-Alpes, Planete project)
$Id: mcl_send.man.2,v 1.2 2003/10/27 09:55:47 roca Exp $