asio 0.1.5 | Main Page | Class Index | Member Index | Tutorial |
Public Types | |
typedef Demuxer_Service | service_type |
The type of the service that will be used to provide demuxer operations. | |
Public Member Functions | |
basic_demuxer () | |
Default constructor. | |
void | run () |
Run the demuxer's event processing loop. | |
void | interrupt () |
Interrupt the demuxer's event processing loop. | |
void | reset () |
Reset the demuxer in preparation for a subsequent run invocation. | |
void | operation_started () |
Notify the demuxer that an operation has started. | |
template<typename Handler> void | operation_completed (Handler handler) |
Notify the demuxer that an operation has completed. | |
template<typename Handler, typename Completion_Context> void | operation_completed (Handler handler, Completion_Context context) |
Notify the demuxer that an operation has completed. | |
template<typename Handler, typename Completion_Context> void | operation_completed (Handler handler, Completion_Context context, bool allow_nested_delivery) |
Notify the demuxer that an operation has completed. | |
template<typename Handler> void | operation_immediate (Handler handler) |
Notify the demuxer of an operation that started and finished immediately. | |
template<typename Handler, typename Completion_Context> void | operation_immediate (Handler handler, Completion_Context context) |
Notify the demuxer of an operation that started and finished immediately. | |
template<typename Handler, typename Completion_Context> void | operation_immediate (Handler handler, Completion_Context context, bool allow_nested_delivery) |
Notify the demuxer of an operation that started and finished immediately. | |
template<typename Service> Service & | get_service (service_factory< Service > factory) |
Obtain the service interface corresponding to the given type. | |
Private Attributes | |
detail::service_registry< basic_demuxer< Demuxer_Service > > | service_registry_ |
The service registry. | |
Demuxer_Service & | service_ |
The underlying demuxer service implementation. |
|
The type of the service that will be used to provide demuxer operations.
|
|
Default constructor.
|
|
Run the demuxer's event processing loop. The run function blocks until all operations have completed and there are no more completions to be delivered, or until the demuxer has been interrupted. The run function may be safely called again once it has completed to execute any new operations or deliver new completions. Multiple threads may call the run function to set up a pool of threads from which the demuxer may dispatch the completion notifications. |
|
Interrupt the demuxer's event processing loop. This function does not block, but instead simply signals to the demuxer that all invocations of its run member function should return as soon as possible. Note that if the run function is interrupted and is not called again later then its operations may not have finished and completions not delivered. In this case a demuxer implementation is not required to make any guarantee that any resources associated with those operations would be cleaned up. |
|
Reset the demuxer in preparation for a subsequent run invocation. This function must be called prior to any second or later set of invocations of the run function. It allows the demuxer to reset any internal state, such as an interrupt flag. This function must not be called while there are any unfinished calls to the run function. |
|
Notify the demuxer that an operation has started. This function is used to inform the demuxer that a new operation has begun. A call to this function must be matched with a later corresponding call to operation_completed. |
|
Notify the demuxer that an operation has completed. This function is used to inform the demuxer that an operation has completed and that it should invoke the given completion handler. A call to this function must be matched with an earlier corresponding call to operation_started. The completion handler is guaranteed to be called only from a thread in which the run member function is being invoked.
|
|
Notify the demuxer that an operation has completed. This function is used to inform the demuxer that an operation has completed and that it should invoke the given completion handler. A call to this function must be matched with an earlier corresponding call to operation_started. The completion handler is guaranteed to be called only from a thread in which the run member function is being invoked.
|
|
Notify the demuxer that an operation has completed. This function is used to inform the demuxer that an operation has completed and that it should invoke the given completion handler. A call to this function must be matched with an earlier corresponding call to operation_started. The completion handler is guaranteed to be called only from a thread in which the run member function is being invoked.
|
|
Notify the demuxer of an operation that started and finished immediately. This function is used to inform the demuxer that an operation has both started and completed immediately, and that it should invoke the given completion handler. A call to this function must not have either of a corresponding operation_started or operation_completed. The completion handler is guaranteed to be called only from a thread in which the run member function is being invoked.
|
|
Notify the demuxer of an operation that started and finished immediately. This function is used to inform the demuxer that an operation has both started and completed immediately, and that it should invoke the given completion handler. A call to this function must not have either of a corresponding operation_started or operation_completed. The completion handler is guaranteed to be called only from a thread in which the run member function is being invoked.
|
|
Notify the demuxer of an operation that started and finished immediately. This function is used to inform the demuxer that an operation has both started and completed immediately, and that it should invoke the given completion handler. A call to this function must not have either of a corresponding operation_started or operation_completed. The completion handler is guaranteed to be called only from a thread in which the run member function is being invoked.
|
|
Obtain the service interface corresponding to the given type. This function is used to locate a service interface that corresponds to the given service type. If there is no existing implementation of the service, then the demuxer will use the supplied factory to create a new instance.
|
|
The service registry.
|
|
The underlying demuxer service implementation.
|