diff options
Diffstat (limited to 'ACE/ace/Acceptor.h')
-rw-r--r-- | ACE/ace/Acceptor.h | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/ACE/ace/Acceptor.h b/ACE/ace/Acceptor.h index ac50a793d34..4b2c236b6f6 100644 --- a/ACE/ace/Acceptor.h +++ b/ACE/ace/Acceptor.h @@ -66,17 +66,16 @@ public: /** * Open the contained @c PEER_ACCEPTOR object to begin listening, and - * register with the specified reactor for connection accept events. - * An ACE_Acceptor can only listen to one port at a time; if one desires to - * change the address that an ACE_Acceptor listens on, call close() - * before calling open() again. + * register with the specified reactor for accept events. An + * acceptor can only listen to one port at a time, so make sure to + * @c close() the acceptor before calling @c open() again. * - * The @c PEER_ACCEPTOR handle is put into nonblocking mode as a + * The @c PEER_ACCEPTOR handle is put into non-blocking mode as a * safeguard against the race condition that can otherwise occur * between the time when the passive-mode socket handle is "ready" - * and when the actual accept() call is made. During this - * interval, the client can shut down the connection, in which case - * the accept() call can block indefinitely. + * and when the actual @c accept() call is made. During this + * interval, the client can shutdown the connection, in which case, + * the @c accept() call can hang. * * @param local_addr The address to listen at. * @param reactor Pointer to the ACE_Reactor instance to register @@ -99,7 +98,7 @@ public: * OS allow reuse of the listen port. The default is 1. */ ACE_Acceptor (const ACE_PEER_ACCEPTOR_ADDR &local_addr, - ACE_Reactor *reactor = ACE_Reactor::instance (), + ACE_Reactor * = ACE_Reactor::instance (), int flags = 0, int use_select = 1, int reuse_addr = 1); @@ -184,18 +183,17 @@ protected: /** * Bridge method for accepting the new connection into the - * specified @a svc_handler. The default behavior delegates to the - * @c PEER_ACCEPTOR::accept() method. + * <svc_handler>. The default behavior delegates to the + * PEER_ACCEPTOR::accept. */ virtual int accept_svc_handler (SVC_HANDLER *svc_handler); /** - * Bridge method for activating the specified @a svc_handler with the - * appropriate concurrency strategy. - * The default behavior of this method is to activate the service handler - * by calling its open() method (which allows the handler to define its - * own concurrency strategy). - * However, subclasses of ACE_Acceptor can override this method to do more + * Bridge method for activating a {svc_handler} with the appropriate + * concurrency strategy. The default behavior of this method is to + * activate the SVC_HANDLER by calling its {open} method (which + * allows the SVC_HANDLER to define its own concurrency strategy). + * However, subclasses can override this strategy to do more * sophisticated concurrency activations (such as making the * SVC_HANDLER as an "active object" via multi-threading or * multi-processing). @@ -391,7 +389,6 @@ public: /// Declare the dynamic allocation hooks. ACE_ALLOC_HOOK_DECLARE; -protected: // = Service management hooks. /// This method delegates to the {Scheduling_Strategy}'s {suspend} @@ -402,6 +399,8 @@ protected: /// method. virtual int resume (void); +protected: + /// Calls {handle_close} when dynamically unlinked. virtual int fini (void); |