source: roaraudio/include/libroar/socket.h @ 75:bca1641a0cd8

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

added support to open files like sockets

File size: 1.1 KB
Line 
1//libroar.h:
2
3#ifndef _LIBROARSOCKET_H_
4#define _LIBROARSOCKET_H_
5
6#include "libroar.h"
7
8#define ROAR_SOCKET_TYPE_NONE 0
9#define ROAR_SOCKET_TYPE_UNKNOWN ROAR_SOCKET_TYPE_NONE
10#define ROAR_SOCKET_TYPE_INET 1
11#define ROAR_SOCKET_TYPE_UNIX 2
12#define ROAR_SOCKET_TYPE_FORK 3
13#define ROAR_SOCKET_TYPE_PIPE ROAR_SOCKET_TYPE_FORK
14#define ROAR_SOCKET_TYPE_FILE 4
15
16#define ROAR_SOCKET_QUEUE_LEN 8
17
18#define ROAR_SOCKET_BLOCK     1
19#define ROAR_SOCKET_NONBLOCK  2
20
21#define ROAR_SOCKET_MAX_HOSTNAMELEN 64
22
23int roar_socket_listen  (int type, char * host, int port);
24int roar_socket_connect (char * host, int port);
25
26int roar_socket_new_tcp (void);
27int roar_socket_new_unix (void);
28int roar_socket_open       (int mode, int type, char * host, int port);
29int roar_socket_open_fork  (int mode, char * host, int port);
30int roar_socket_open_file  (int mode, char * host, int port);
31int roar_socket_open_proxy (int mode, int type, char * host, int port, char * proxy_type);
32
33int roar_socket_nonblock(int fh, int state);
34
35int roar_socket_open_socks4a(int mode, int fh, char * host, int port);
36
37#endif
38
39//ll
Note: See TracBrowser for help on using the repository browser.