OSDN Git Service

2013.10.24
[uclinux-h8/uClinux-dist.git] / user / camserv / socket.h
1 #ifndef SOCKET_DOT_H
2 #define SOCKET_DOT_H
3
4 #include <unistd.h>
5 #include <fcntl.h>
6 #include <sys/time.h>
7 #include <sys/types.h>
8 #include <sys/socket.h>
9 #include <netinet/in.h>
10 #include <netdb.h>
11 #include <arpa/inet.h>
12
13 typedef struct socket_st Socket;
14
15 extern Socket *socket_serve_tcp( const char *hname, int port, int backlog );
16 extern Socket *socket_accept( const Socket *listen_sock );
17 extern Socket *socket_new();
18 extern const char *socket_query_remote_name( Socket *sock );
19 extern int socket_query_fd( const Socket *sock );
20 extern void socket_dest( Socket *sock );
21 extern Socket **socket_unix_pair( int type );
22 extern void socket_unix_pair_dest( Socket **sockpair );
23 extern Socket *socket_connect( const char *remote_name, int remote_port );
24 extern int socket_set_nonblock( Socket *sock );
25 extern void socket_zero( Socket *sock );
26
27 #endif