source: roaraudio/include/libroar/socket.h @ 510:672fda911376

Last change on this file since 510:672fda911376 was 509:17952ed84309, checked in by phi, 16 years ago

started with IPv6 support

File size: 1.7 KB
RevLine 
[0]1//libroar.h:
2
3#ifndef _LIBROARSOCKET_H_
4#define _LIBROARSOCKET_H_
5
6#include "libroar.h"
7
[81]8#define ROAR_SOCKET_MODE_LISTEN  1
9#define ROAR_SOCKET_MODE_CONNECT 2
10
[0]11#define ROAR_SOCKET_TYPE_NONE 0
12#define ROAR_SOCKET_TYPE_UNKNOWN ROAR_SOCKET_TYPE_NONE
13#define ROAR_SOCKET_TYPE_INET 1
[230]14#define ROAR_SOCKET_TYPE_TCP  ROAR_SOCKET_TYPE_INET
[0]15#define ROAR_SOCKET_TYPE_UNIX 2
[69]16#define ROAR_SOCKET_TYPE_FORK 3
17#define ROAR_SOCKET_TYPE_PIPE ROAR_SOCKET_TYPE_FORK
[75]18#define ROAR_SOCKET_TYPE_FILE 4
[374]19#define ROAR_SOCKET_TYPE_UDP  5
[378]20#define ROAR_SOCKET_TYPE_GENSTR 6 /* generic stream: TCP or UNIX */
[501]21#define ROAR_SOCKET_TYPE_DECNET 7 /* DECnet */
[0]22
[81]23#define ROAR_SOCKET_TYPE_MAX  4
24
[0]25#define ROAR_SOCKET_QUEUE_LEN 8
26
27#define ROAR_SOCKET_BLOCK     1
28#define ROAR_SOCKET_NONBLOCK  2
29
[2]30#define ROAR_SOCKET_MAX_HOSTNAMELEN 64
31
[0]32int roar_socket_listen  (int type, char * host, int port);
33int roar_socket_connect (char * host, int port);
34
[374]35int roar_socket_new_tcp    (void);
36int roar_socket_new_udp    (void);
[509]37int roar_socket_new_tcp6   (void);
38int roar_socket_new_udp6   (void);
[374]39int roar_socket_new_unix   (void);
[508]40int roar_socket_new_decnet_seqpacket (void);
41int roar_socket_new_decnet_stream (void);
42
[69]43int roar_socket_open       (int mode, int type, char * host, int port);
44int roar_socket_open_fork  (int mode, char * host, int port);
[75]45int roar_socket_open_file  (int mode, char * host, int port);
[2]46int roar_socket_open_proxy (int mode, int type, char * host, int port, char * proxy_type);
[0]47
[508]48int roar_socket_listen_decnet (char * object, int num);
49
[0]50int roar_socket_nonblock(int fh, int state);
51
[375]52int roar_socket_dup_udp_local_end (int fh);
53
[2]54int roar_socket_open_socks4a(int mode, int fh, char * host, int port);
55
[0]56#endif
57
58//ll
Note: See TracBrowser for help on using the repository browser.