1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
libemcast API
by David Helder
Copyright (C) 2001 Regents of the University of Michigan
============================================================
IN PROGRESS. See libemcast.h and libemcast.c. It's not complex.
Creating, joining, leaving
--------------------------
int emcast_join (Emcast** emcastp, const char* url);
int emcast_leave (Emcast* emcast);
To do async reads, select on return value of join. Assume
(optimisticly) that writes don't block.
Sending and receiving
---------------------
int emcast_send (Emcast* emcast, const char* buf, size_t len);
int emcast_recv (Emcast* emcast, char* buf, size_t len);
int emcast_recvfrom (Emcast* emcast, char* buf, int len,
void* from, size_t* fromlen);
Setting and getting options
---------------------------
int emcast_setopt (Emcast* emcast, const char* optname,
const void* optval, size_t optlen);
int emcast_getopt (Emcast* emcast, const char* optname,
void* optval, size_t* optlen);
Emcast errors
-------------
char* emcast_strerror (int errnum);
Most functions return 0 on success or a non-zero error number on
failure. This error number may be positive or negative (see the
documentation for the particular function). The error number can be
converted to a constant string using emcast_strerror.
|