source: roaraudio/doc/man3/roar_socket_listen.3 @ 5050:ac5ec473f00c

Last change on this file since 5050:ac5ec473f00c was 5032:b2c8bbc7907f, checked in by phi, 13 years ago

some manpage correction

File size: 1.9 KB
Line 
1.\" roar_simple_play.3:
2
3.TH "roar_socket_listen" "3" "May 2011" "RoarAudio" "System Manager's Manual: RoarAudio"
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_DECNET\fR
56DECnet socket.
57
58.TP
59\fBROAR_SOCKET_TYPE_FORK\fR
60This is to fork a roard to communicate with. Can't be use to listen on, just to connect to.
61\fBhost\fR and \fBport\fR is ignored at the moment.
62
63.TP
64\fBROAR_SOCKET_TYPE_FILE\fR
65This is used to open a plain file. Can't be use to listen on, just to connect to.
66\fBhost\fR is the filename to connect to.
67
68
69.SH "RETURN VALUE"
70On success these calls return filehandle.  On error, \-1 is returned.
71
72.SH "BUGS"
73Listening on UDP sockets is not supported at the moment.
74
75.SH "EXAMPLES"
76FIXME
77
78.SH "SEE ALSO"
79\fBaccept\fR(2),
80\fBlibroar\fR(7),
81\fBRoarAudio\fR(7).
82
83.\" ll
Note: See TracBrowser for help on using the repository browser.