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_NS_stropts.h"
00026
00027 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 class ACE_Export ACE_SOCK : public ACE_IPC_SAP
00042 {
00043 public:
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
00059
00060
00061
00062
00063
00064 int close (void);
00065
00066
00067
00068 int get_local_addr (ACE_Addr &) const;
00069
00070
00071
00072
00073
00074
00075 int get_remote_addr (ACE_Addr &) const;
00076
00077
00078 void dump (void) const;
00079
00080
00081 ACE_ALLOC_HOOK_DECLARE;
00082
00083
00084 int open (int type,
00085 int protocol_family,
00086 int protocol,
00087 int reuse_addr);
00088
00089
00090 int open (int type,
00091 int protocol_family,
00092 int protocol,
00093 ACE_Protocol_Info *protocolinfo,
00094 ACE_SOCK_GROUP g,
00095 u_long flags,
00096 int reuse_addr);
00097
00098 protected:
00099
00100
00101
00102 ACE_SOCK (int type,
00103 int protocol_family,
00104 int protocol = 0,
00105 int reuse_addr = 0);
00106
00107
00108
00109 ACE_SOCK (int type,
00110 int protocol_family,
00111 int protocol,
00112 ACE_Protocol_Info *protocolinfo,
00113 ACE_SOCK_GROUP g,
00114 u_long flags,
00115 int reuse_addr);
00116
00117
00118
00119 ACE_SOCK (void);
00120
00121
00122
00123
00124
00125
00126
00127 ~ACE_SOCK (void);
00128
00129 };
00130
00131 ACE_END_VERSIONED_NAMESPACE_DECL
00132
00133 #if defined (__ACE_INLINE__)
00134 #include "ace/SOCK.inl"
00135 #endif
00136
00137 #include "ace/post.h"
00138 #endif