File: libemcast-api.txt

package info (click to toggle)
emcast 0.3.2-6
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,532 kB
  • ctags: 898
  • sloc: sh: 9,351; ansic: 7,234; perl: 731; makefile: 168
file content (51 lines) | stat: -rw-r--r-- 1,301 bytes parent folder | download | duplicates (2)
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.