summaryrefslogtreecommitdiff
path: root/ace/SOCK.h
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-11-01 22:17:39 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-11-01 22:17:39 +0000
commit53284e215e3d3351a7d7e9c4b68f14b427fb4377 (patch)
tree97236ece363cff48fd287c780db4290da39b02cb /ace/SOCK.h
parent7b7c52ad2abd228138ba1a948d5e28bf6dc3b880 (diff)
downloadATCD-53284e215e3d3351a7d7e9c4b68f14b427fb4377.tar.gz
ChangeLogTag:Wed Nov 1 14:11:48 2000 Carlos O'Ryan <coryan@uci.edu>
Diffstat (limited to 'ace/SOCK.h')
-rw-r--r--ace/SOCK.h93
1 files changed, 45 insertions, 48 deletions
diff --git a/ace/SOCK.h b/ace/SOCK.h
index 4c02306a523..48626bf5dd4 100644
--- a/ace/SOCK.h
+++ b/ace/SOCK.h
@@ -1,18 +1,15 @@
/* -*- C++ -*- */
-// $Id$
-
-//============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// SOCK.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-//============================================================================
+
+//=============================================================================
+/**
+ * @file SOCK.h
+ *
+ * $Id$
+ *
+ * @author Doug Schmidt
+ */
+//=============================================================================
+
#ifndef ACE_SOCK_H
#define ACE_SOCK_H
@@ -28,58 +25,63 @@
#include "ace/IPC_SAP.h"
#include "ace/QoS_Session.h"
+/**
+ * @class ACE_SOCK
+ *
+ * @brief An abstract class that forms the basis for more specific
+ * classes, such as <ACE_SOCK_Acceptor> and <ACE_SOCK_Stream>.
+ * Do not instantiate this class.
+ *
+ * This class provides functions that are common to all of the
+ * <ACE_SOCK_*> classes. <ACE_SOCK> provides the ability to get
+ * and set socket options, get the local and remote addresses,
+ * and close the socket.
+ */
class ACE_Export ACE_SOCK : public ACE_IPC_SAP
{
- // = TITLE
- // An abstract class that forms the basis for more specific
- // classes, such as <ACE_SOCK_Acceptor> and <ACE_SOCK_Stream>.
- // Do not instantiate this class.
- //
- // = DESCRIPTION
- // This class provides functions that are common to all of the
- // <ACE_SOCK_*> classes. <ACE_SOCK> provides the ability to get
- // and set socket options, get the local and remote addresses,
- // and close the socket.
public:
+ /// Default ctor/dtor.
~ACE_SOCK (void);
- // Default ctor/dtor.
+ /// Wrapper around the <setsockopt> system call.
int set_option (int level,
int option,
void *optval,
int optlen) const;
- // Wrapper around the <setsockopt> system call.
+ /// Wrapper around the <getsockopt> system call.
int get_option (int level,
int option,
void *optval,
int *optlen) const;
- // Wrapper around the <getsockopt> system call.
+ /// Close down the socket.
int close (void);
- // Close down the socket.
+ /// Return the local endpoint address in the referenced <ACE_Addr>.
+ /// Returns 0 if successful, else -1.
int get_local_addr (ACE_Addr &) const;
- // Return the local endpoint address in the referenced <ACE_Addr>.
- // Returns 0 if successful, else -1.
+ /**
+ * Return the address of the remotely connected peer (if there is
+ * one), in the referenced <ACE_Addr>. Returns 0 if successful, else
+ * -1.
+ */
int get_remote_addr (ACE_Addr &) const;
- // Return the address of the remotely connected peer (if there is
- // one), in the referenced <ACE_Addr>. Returns 0 if successful, else
- // -1.
+ /// Dump the state of an object.
void dump (void) const;
- // Dump the state of an object.
+ /// Declare the dynamic allocation hooks.
ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
+ /// Wrapper around the BSD-style <socket> system call (no QoS).
int open (int type,
int protocol_family,
int protocol,
int reuse_addr);
- // Wrapper around the BSD-style <socket> system call (no QoS).
+ /// Wrapper around the QoS-enabled <WSASocket> function.
int open (int type,
int protocol_family,
int protocol,
@@ -87,16 +89,17 @@ public:
ACE_SOCK_GROUP g,
u_long flags,
int reuse_addr);
- // Wrapper around the QoS-enabled <WSASocket> function.
-
+
protected:
+ /// Constructor with arguments to call the BSD-style <socket> system
+ /// call (no QoS).
ACE_SOCK (int type,
int protocol_family,
int protocol = 0,
int reuse_addr = 0);
- // Constructor with arguments to call the BSD-style <socket> system
- // call (no QoS).
+ /// Constructor with arguments to call the QoS-enabled <WSASocket>
+ /// function.
ACE_SOCK (int type,
int protocol_family,
int protocol,
@@ -104,12 +107,10 @@ protected:
ACE_SOCK_GROUP g,
u_long flags,
int reuse_addr);
- // Constructor with arguments to call the QoS-enabled <WSASocket>
- // function.
+ /// Default constructor is private to prevent instances of this class
+ /// from being defined.
ACE_SOCK (void);
- // Default constructor is private to prevent instances of this class
- // from being defined.
};
@@ -119,7 +120,3 @@ protected:
#include "ace/post.h"
#endif /* ACE_SOCK_H */
-
-
-
-