summaryrefslogtreecommitdiff
path: root/PACE/pace/posix/socket.h
blob: abd0c8d4f72666544476aacadfd2013370afd983 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/* $Id$

 * ============================================================================
 *
 * = LIBRARY
 *    pace
 *
 * = FILENAME
 *    pace/posix/socket.h
 *
 * = AUTHOR
 *    Luther Baker
 *
 * ============================================================================ */

#ifndef PACE_SYS_SOCKET_H
#define PACE_SYS_SOCKET_H

#include "pace/sys/types.h"
#include <sys/socket.h>

#if defined (PACE_HAS_CPLUSPLUS)
extern "C" {
#endif /* PACE_HAS_CPLUSPLUS */

  PACE_INLINE int pace_closesocket (PACE_HANDLE handle);

  PACE_INLINE int pace_getpeername (int s,
                                    struct  sockaddr * name,
                                    socklen_t * namelen);

  PACE_INLINE int pace_getsockname (int s,
                                    struct sockaddr * name,
                                    socklen_t * namelen);

  PACE_INLINE int pace_getsockopt (int s,
                                   int level,
                                   int optname,
                                   void  * optval,
                                   socklen_t * optlen);

  PACE_INLINE int pace_setsockopt (int s,
                                   int level,
                                   int  optname,
                                   const  void * optval,
                                   socklen_t optlen);

  PACE_INLINE int pace_socket (int domain,
                               int type,
                               int protocol);

#if defined (PACE_HAS_CPLUSPLUS)
}
#endif /* PACE_HAS_CPLUSPLUS */

#if defined (PACE_HAS_INLINE)
# include "pace/posix/socket.inl"
#endif /* PACE_HAS_INLINE */

#endif /* PACE_SYS_SOCKET_H */