[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 |
---|
| 14 | #define ROAR_SOCKET_TYPE_UNIX 2 |
---|
[69] | 15 | #define ROAR_SOCKET_TYPE_FORK 3 |
---|
| 16 | #define ROAR_SOCKET_TYPE_PIPE ROAR_SOCKET_TYPE_FORK |
---|
[75] | 17 | #define ROAR_SOCKET_TYPE_FILE 4 |
---|
[0] | 18 | |
---|
[81] | 19 | #define ROAR_SOCKET_TYPE_MAX 4 |
---|
| 20 | |
---|
[0] | 21 | #define ROAR_SOCKET_QUEUE_LEN 8 |
---|
| 22 | |
---|
| 23 | #define ROAR_SOCKET_BLOCK 1 |
---|
| 24 | #define ROAR_SOCKET_NONBLOCK 2 |
---|
| 25 | |
---|
[2] | 26 | #define ROAR_SOCKET_MAX_HOSTNAMELEN 64 |
---|
| 27 | |
---|
[0] | 28 | int roar_socket_listen (int type, char * host, int port); |
---|
| 29 | int roar_socket_connect (char * host, int port); |
---|
| 30 | |
---|
| 31 | int roar_socket_new_tcp (void); |
---|
| 32 | int roar_socket_new_unix (void); |
---|
[69] | 33 | int roar_socket_open (int mode, int type, char * host, int port); |
---|
| 34 | int roar_socket_open_fork (int mode, char * host, int port); |
---|
[75] | 35 | int roar_socket_open_file (int mode, char * host, int port); |
---|
[2] | 36 | int roar_socket_open_proxy (int mode, int type, char * host, int port, char * proxy_type); |
---|
[0] | 37 | |
---|
| 38 | int roar_socket_nonblock(int fh, int state); |
---|
| 39 | |
---|
[2] | 40 | int roar_socket_open_socks4a(int mode, int fh, char * host, int port); |
---|
| 41 | |
---|
[0] | 42 | #endif |
---|
| 43 | |
---|
| 44 | //ll |
---|