ACE_Oneshot_Acceptor< SVC_HANDLER, > Class Template ReferenceGeneric factory for passively connecting clients and creating exactly one service handler (SVC_HANDLER). More...
Inheritance diagram for ACE_Oneshot_Acceptor< SVC_HANDLER, >:
Collaboration diagram for ACE_Oneshot_Acceptor< SVC_HANDLER, >:
Detailed Descriptiontemplate<class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
Generic factory for passively connecting clients and creating exactly one service handler (SVC_HANDLER).
|
typedef ACE_PEER_ACCEPTOR_ADDR ACE_Oneshot_Acceptor< SVC_HANDLER, >::addr_type |
typedef ACE_PEER_ACCEPTOR ACE_Oneshot_Acceptor< SVC_HANDLER, >::acceptor_type |
typedef SVC_HANDLER ACE_Oneshot_Acceptor< SVC_HANDLER, >::handler_type |
typedef SVC_HANDLER::stream_type ACE_Oneshot_Acceptor< SVC_HANDLER, >::stream_type |
ACE_Oneshot_Acceptor< SVC_HANDLER, >::ACE_Oneshot_Acceptor | ( | void | ) | [inline] |
Constructor.
ACE_Oneshot_Acceptor< SVC_HANDLER, >::ACE_Oneshot_Acceptor | ( | const ACE_PEER_ACCEPTOR_ADDR & | local_addr, | |
ACE_Reactor * | reactor = ACE_Reactor::instance () , |
|||
ACE_Concurrency_Strategy< SVC_HANDLER > * | cs = 0 | |||
) | [inline] |
Initialize the appropriate strategies for concurrency and then open the {peer_acceptor} at the designated {local_addr}. Note that unlike the {ACE_Acceptor} and {ACE_Strategy_Acceptor}, this method does NOT register {this} acceptor with the {reactor} at this point -- it just stashes the {reactor} away in case it's needed later.
ACE_Oneshot_Acceptor< SVC_HANDLER, >::~ACE_Oneshot_Acceptor | ( | void | ) | [inline, virtual] |
Close down the {Oneshot_Acceptor}.
int ACE_Oneshot_Acceptor< SVC_HANDLER, >::open | ( | const ACE_PEER_ACCEPTOR_ADDR & | local_addr, | |
ACE_Reactor * | reactor = ACE_Reactor::instance () , |
|||
ACE_Concurrency_Strategy< SVC_HANDLER > * | con_s = 0 | |||
) | [inline] |
Initialize the appropriate strategies for concurrency and then open the {peer_acceptor} at the designated {local_addr}. Note that unlike the {ACE_Acceptor} and {ACE_Strategy_Acceptor}, this method does NOT register {this} acceptor with the {reactor} at this point -- it just stashes the {reactor} away in case it's needed later.
int ACE_Oneshot_Acceptor< SVC_HANDLER, >::accept | ( | SVC_HANDLER * | svc_handler = 0 , |
|
ACE_PEER_ACCEPTOR_ADDR * | remote_addr = 0 , |
|||
const ACE_Synch_Options & | synch_options = ACE_Synch_Options::defaults , |
|||
int | restart = 1 , |
|||
int | reset_new_handle = 0 | |||
) | [inline, virtual] |
Create a {SVC_HANDLER}, accept the connection into the {SVC_HANDLER}, and activate the {SVC_HANDLER}.
int ACE_Oneshot_Acceptor< SVC_HANDLER, >::cancel | ( | void | ) | [inline, virtual] |
Cancel a oneshot acceptor that was started asynchronously.
ACE_Oneshot_Acceptor< SVC_HANDLER, >::operator ACE_PEER_ACCEPTOR & | ( | ) | const [inline, virtual] |
Return the underlying {PEER_ACCEPTOR} object.
ACE_PEER_ACCEPTOR & ACE_Oneshot_Acceptor< SVC_HANDLER, >::acceptor | ( | void | ) | const [inline, virtual] |
Return the underlying {PEER_ACCEPTOR} object.
int ACE_Oneshot_Acceptor< SVC_HANDLER, >::close | ( | void | ) | [inline, virtual] |
Close down the {Oneshot_Acceptor}.
void ACE_Oneshot_Acceptor< SVC_HANDLER, >::dump | ( | void | ) | const [inline] |
Dump the state of an object.
int ACE_Oneshot_Acceptor< SVC_HANDLER, >::activate_svc_handler | ( | SVC_HANDLER * | svc_handler | ) | [inline, protected, virtual] |
Bridge method for activating a {svc_handler} with the appropriate concurrency strategy. Default behavior is to activate the {SVC_HANDLER} as a "passive object." However, subclasses can override this strategy to do more sophisticated concurrency activations (such as creating the {SVC_HANDLER} as an "active object" via multi-threading or multi-processing).
int ACE_Oneshot_Acceptor< SVC_HANDLER, >::shared_accept | ( | SVC_HANDLER * | svc_handler, | |
ACE_PEER_ACCEPTOR_ADDR * | remote_addr, | |||
ACE_Time_Value * | timeout, | |||
int | restart, | |||
int | reset_new_handle | |||
) | [inline, protected] |
Factors out the code shared between the {accept} and {handle_input} methods.
ACE_HANDLE ACE_Oneshot_Acceptor< SVC_HANDLER, >::get_handle | ( | void | ) | const [inline, protected, virtual] |
int ACE_Oneshot_Acceptor< SVC_HANDLER, >::handle_close | ( | ACE_HANDLE | = ACE_INVALID_HANDLE , |
|
ACE_Reactor_Mask | = ACE_Event_Handler::ALL_EVENTS_MASK | |||
) | [inline, protected, virtual] |
Perform termination activities when {this} is removed from the {reactor}.
Reimplemented from ACE_Event_Handler.
int ACE_Oneshot_Acceptor< SVC_HANDLER, >::handle_input | ( | ACE_HANDLE | ) | [inline, protected, virtual] |
Accept one connection from a client and activates the SVC_HANDLER.
Reimplemented from ACE_Event_Handler.
int ACE_Oneshot_Acceptor< SVC_HANDLER, >::handle_timeout | ( | const ACE_Time_Value & | tv, | |
const void * | arg | |||
) | [inline, protected, virtual] |
int ACE_Oneshot_Acceptor< SVC_HANDLER, >::init | ( | int | argc, | |
ACE_TCHAR * | argv[] | |||
) | [inline, protected, virtual] |
Default version does no work and returns -1. Must be overloaded by application developer to do anything meaningful.
Reimplemented from ACE_Shared_Object.
int ACE_Oneshot_Acceptor< SVC_HANDLER, >::fini | ( | void | ) | [inline, protected, virtual] |
Default version does no work and returns -1. Must be overloaded by application developer to do anything meaningful.
Reimplemented from ACE_Shared_Object.
int ACE_Oneshot_Acceptor< SVC_HANDLER, >::info | ( | ACE_TCHAR ** | strp, | |
size_t | length | |||
) | const [inline, protected, virtual] |
int ACE_Oneshot_Acceptor< SVC_HANDLER, >::suspend | ( | void | ) | [inline, protected, virtual] |
Default version does no work and returns -1. Must be overloaded by application developer to do anything meaningful.
Reimplemented from ACE_Service_Object.
int ACE_Oneshot_Acceptor< SVC_HANDLER, >::resume | ( | void | ) | [inline, protected, virtual] |
Default version does no work and returns -1. Must be overloaded by application developer to do anything meaningful.
Reimplemented from ACE_Service_Object.
int ACE_Oneshot_Acceptor< SVC_HANDLER, >::register_handler | ( | SVC_HANDLER * | svc_handler, | |
const ACE_Synch_Options & | options, | |||
int | restart | |||
) | [inline, private] |
Insert ourselves into the {ACE_Reactor} so that we can continue accepting this connection asynchronously. This method should NOT be called by developers directly.
ACE_Oneshot_Acceptor< SVC_HANDLER, >::ACE_ALLOC_HOOK_DECLARE |
Declare the dynamic allocation hooks.
SVC_HANDLER* ACE_Oneshot_Acceptor< SVC_HANDLER, >::svc_handler_ [private] |
Hold the svc_handler_ across asynchrony boundaries.
int ACE_Oneshot_Acceptor< SVC_HANDLER, >::restart_ [private] |
Hold the restart flag across asynchrony boundaries.
ACE_PEER_ACCEPTOR ACE_Oneshot_Acceptor< SVC_HANDLER, >::peer_acceptor_ [private] |
Factory that establishes connections passively.
ACE_Concurrency_Strategy<SVC_HANDLER>* ACE_Oneshot_Acceptor< SVC_HANDLER, >::concurrency_strategy_ [private] |
Concurrency strategy for an Acceptor.
bool ACE_Oneshot_Acceptor< SVC_HANDLER, >::delete_concurrency_strategy_ [private] |
true if Acceptor created the concurrency strategy and thus should delete it, else false.