diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-02-22 00:18:45 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-02-22 00:18:45 +0000 |
commit | f0bf9c81fe9258869b15d7ba06453252ac64665d (patch) | |
tree | a18314a72bf1f79a83f77b8864df954fd60d996d /ace/SOCK.h | |
parent | 2c1882c7416d40fd95e660244f4095530368253e (diff) | |
download | ATCD-f0bf9c81fe9258869b15d7ba06453252ac64665d.tar.gz |
foo
Diffstat (limited to 'ace/SOCK.h')
-rw-r--r-- | ace/SOCK.h | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/ace/SOCK.h b/ace/SOCK.h index bc2e64dc022..d2d2ac19647 100644 --- a/ace/SOCK.h +++ b/ace/SOCK.h @@ -1,7 +1,7 @@ /* -*- C++ -*- */ // $Id$ -// ============================================================================ +//============================================================================ // // = LIBRARY // ace @@ -12,7 +12,7 @@ // = AUTHOR // Doug Schmidt // -// ============================================================================ +//============================================================================ #if !defined (ACE_SOCK_H) #define ACE_SOCK_H @@ -23,31 +23,39 @@ class ACE_Export ACE_SOCK : public ACE_IPC_SAP // = TITLE - // Defines the member functions for the base class of the - // ACE_SOCK abstraction. + // An abstract class which forms the basis for more specific + // classes (such as ACE_SOCK_Acceptor and ACE_SOCK_Connector). + // Do not instantiate this class. + + // = This class provides functions that are common to all of the + // SOCK-type classes. ACE_SOCK provides the ability to get and set + // socket options, get the local and remote addresses, and close + // the socket. + { public: int set_option (int level, - int option, - void *optval, - int optlen) const; + int option, + void *optval, + int optlen) const; // Wrapper around the setsockopt() system call. int get_option (int level, - int option, - void *optval, - int *optlen) const; + int option, + void *optval, + int *optlen) const; // Wrapper around the getsockopt() system call. int close (void); // Close down the socket. int get_local_addr (ACE_Addr &) const; - // Return the local endpoint address. + // Return the local endpoint address 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). + // one), in the referenced ACE_Addr. Returns 0 if successful, else -1. void dump (void) const; // Dump the state of an object. @@ -56,17 +64,18 @@ public: // Declare the dynamic allocation hooks. protected: - // = Make this an abstract class. + ACE_SOCK (void); - // Default constructor. + // Default constructor. It's protected to make sure no instance is + // instantiated. int open (int type, - int protocol_family, - int protocol); + int protocol_family, + int protocol); // Wrapper around the socket() system call. ACE_SOCK (int type, int protocol_family, int protocol = 0); - // Wrapper around the socket() system call. + // Constructor with arguments to also call the socket() system call. #if defined (ACE_WIN32) static ACE_SOCK dummy_; |