00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef ACE_SOCK_H
00014 #define ACE_SOCK_H
00015 #include "ace/pre.h"
00016
00017 #include "ace/ACE_export.h"
00018
00019 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00020 # pragma once
00021 #endif
00022
00023 #include "ace/Addr.h"
00024 #include "ace/IPC_SAP.h"
00025 #include "ace/OS.h"
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 class ACE_Export ACE_SOCK : public ACE_IPC_SAP
00040 {
00041 public:
00042
00043 ~ACE_SOCK (void);
00044
00045
00046 int set_option (int level,
00047 int option,
00048 void *optval,
00049 int optlen) const;
00050
00051
00052 int get_option (int level,
00053 int option,
00054 void *optval,
00055 int *optlen) const;
00056
00057
00058 int close (void);
00059
00060
00061
00062 int get_local_addr (ACE_Addr &) const;
00063
00064
00065
00066
00067
00068
00069 int get_remote_addr (ACE_Addr &) const;
00070
00071
00072 void dump (void) const;
00073
00074
00075 ACE_ALLOC_HOOK_DECLARE;
00076
00077
00078 int open (int type,
00079 int protocol_family,
00080 int protocol,
00081 int reuse_addr);
00082
00083
00084 int open (int type,
00085 int protocol_family,
00086 int protocol,
00087 ACE_Protocol_Info *protocolinfo,
00088 ACE_SOCK_GROUP g,
00089 u_long flags,
00090 int reuse_addr);
00091
00092 protected:
00093
00094
00095 ACE_SOCK (int type,
00096 int protocol_family,
00097 int protocol = 0,
00098 int reuse_addr = 0);
00099
00100
00101
00102 ACE_SOCK (int type,
00103 int protocol_family,
00104 int protocol,
00105 ACE_Protocol_Info *protocolinfo,
00106 ACE_SOCK_GROUP g,
00107 u_long flags,
00108 int reuse_addr);
00109
00110
00111
00112 ACE_SOCK (void);
00113
00114 };
00115
00116 #if !defined (ACE_LACKS_INLINE_FUNCTIONS)
00117 #include "ace/SOCK.i"
00118 #endif
00119
00120 #include "ace/post.h"
00121 #endif