diff options
Diffstat (limited to 'ace/Sock_Connect.h')
-rw-r--r-- | ace/Sock_Connect.h | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/ace/Sock_Connect.h b/ace/Sock_Connect.h index 532892d64fa..1803636a2e2 100644 --- a/ace/Sock_Connect.h +++ b/ace/Sock_Connect.h @@ -28,14 +28,16 @@ // Forward Declarations class ACE_INET_Addr; -namespace ACE +class ACE_Export ACE_Sock_Connect { + public: + // = Socket connection establishment calls. /// Bind a new unused port to @a handle. - extern ACE_Export int bind_port (ACE_HANDLE handle, - ACE_UINT32 ip_addr = INADDR_ANY, - int address_family = AF_UNSPEC); + static int bind_port (ACE_HANDLE handle, + ACE_UINT32 ip_addr = INADDR_ANY, + int address_family = AF_UNSPEC); /** * Get our broadcast address based on our @a host_addr. If @@ -45,31 +47,30 @@ namespace ACE * socket internally (and free it). Returns -1 on failure and 0 on * success. */ - extern ACE_Export int get_bcast_addr ( - ACE_UINT32 &bcast_addr, - const ACE_TCHAR *hostname = 0, - ACE_UINT32 host_addr = 0, - ACE_HANDLE handle = ACE_INVALID_HANDLE); + static int get_bcast_addr (ACE_UINT32 &bcast_addr, + const ACE_TCHAR *hostname = 0, + ACE_UINT32 host_addr = 0, + ACE_HANDLE handle = ACE_INVALID_HANDLE); /** * Return count and array of all configured IP interfaces on this * host, rc = 0 on success (count == number of interfaces else -1). * Caller is responsible for calling delete [] on @a addr_array. */ - extern ACE_Export int get_ip_interfaces (size_t &count, - ACE_INET_Addr *&addr_array); + static int get_ip_interfaces (size_t &count, + ACE_INET_Addr *&addr_array); /** * Helper routine for get_ip_interfaces, differs by UNIX platform so * put into own subroutine. perform some ioctls to retrieve ifconf * list of ifreq structs. */ - extern ACE_Export int count_interfaces (ACE_HANDLE handle, + static int count_interfaces (ACE_HANDLE handle, size_t &how_many); /// Routine to return a handle from which @c ioctl requests can be /// made. Caller must close the handle. - extern ACE_Export ACE_HANDLE get_handle (void); + static ACE_HANDLE get_handle (void); /** * Returns 1 if IPv6 is enabled on the current host; 0 if not. @@ -79,8 +80,14 @@ namespace ACE * returning 1 if it succeeds, and 0 if it fails. Caches the result * so it only gets checked once. */ - extern ACE_Export int ipv6_enabled (void); -} + static int ipv6_enabled (void); + +#if defined (ACE_HAS_IPV6) +private: + /// Does this box have ipv6 turned on? + static int ipv6_enabled_; +#endif /* ACE_HAS_IPV6 */ +}; #include /**/ "ace/post.h" |