source: roaraudio/doc/man3/roar_socket_listen.3 @ 159:c5916bd25fe3

Last change on this file since 159:c5916bd25fe3 was 159:c5916bd25fe3, checked in by phi, 16 years ago

added some new manpages

File size: 1.9 KB
Line 
1.\" roar_simple_play.3:
2
3.TH "roar_socket_listen" "3" "July 2008" "RoarAudio" "System Manager's Manual: RoarAuido"
4
5.SH NAME
6roar_socket_listen \- Opens a new listen socket
7
8.SH SYNOPSIS
9
10#include <roaraudio.h>
11
12int roar_socket_listen(int type, char * host, int port);
13
14.SH "DESCRIPTION"
15Opens a new listening socket for network clients to connect to.
16You may accept new connections via \fBaccept\fR(2).
17
18.SH "PARAMETERS"
19.TP
20\fBtype\fR
21The type of the Socket. See the list below.
22
23.TP
24\fBhost\fR
25The host or path name to listen on.
26This depends on the type argument.
27For TCP/IP to listen on any interface use a value of "0.0.0.0".
28
29.TP
30\fBport\fR
31The port number to listen on.
32This may be ignored by types not supporting port numbers.
33
34.SH "SOCKET TYPES"
35.TP
36\fBROAR_SOCKET_TYPE_UNKNOWN\fR
37The type will be auto detected. Don't use this if you know the type. Only use this
38to support user given addresses and enable auto detection.
39
40.TP
41\fBROAR_SOCKET_TYPE_TCP\fR
42Use a TCP/IP connection. This is standard mode for networking.
43\fBhost\fR is the hostname or IP to listen on and \fBport\fR is the port number to use.
44
45.TP
46\fBROAR_SOCKET_TYPE_INET\fR
47Same as above but deprecated. Use \fBROAR_SOCKET_TYPE_TCP\fR.
48
49.TP
50\fBROAR_SOCKET_TYPE_UNIX\fR
51UNIX Domain Socket. This should be default for local connections.
52\fBhost\fR is the filename of the socket.
53
54.TP
55\fBROAR_SOCKET_TYPE_FORK\fR
56This is to fork a roard to communicate with. Can't be use to listen on, just to connect to.
57\fBhost\fR and \fBport\fR is ignored at the moment.
58
59.TP
60\fBROAR_SOCKET_TYPE_FILE\fR
61This is used to open a plain file. Can't be use to listen on, just to connect to.
62\fBhost\fR is the filename to connect to.
63
64
65.SH "RETURN VALUE"
66On success these calls return filehandle.  On error, -1 is returned.
67
68.SH "BUGS"
69Listening on UDP sockets is not supported at the moment.
70
71.SH "EXAMPLES"
72FIXME
73
74.SH "SEE ALSO"
75\fBaccept\fR(2),
76\fBlibroar\fR(7),
77\fBRoarAudio\fR(7).
78
79.\" ll
Note: See TracBrowser for help on using the repository browser.