qb
2.0.0.0
C++17 Actor Framework
|
Core asynchronous I/O class templates for event-driven operations. More...
#include <qb/utility/type_traits.h>
#include "event/all.h"
#include "listener.h"
#include "protocol.h"
Go to the source code of this file.
Classes | |
class | qb::io::async::base< _Derived, _EV_EVENT > |
Base class for all qb-io asynchronous components that interact with the event listener. More... | |
class | qb::io::async::with_timeout< _Derived > |
CRTP base class that adds timeout functionality to derived asynchronous components. More... | |
class | qb::io::async::Timeout< _Func > |
Utility class to execute a function after a specified timeout using the event loop. More... | |
class | qb::io::async::file_watcher< _Derived > |
CRTP base class for watching a single file for attribute changes and processing its contents. More... | |
class | qb::io::async::directory_watcher< _Derived > |
CRTP base class for watching a directory for attribute changes. More... | |
class | qb::io::async::input< _Derived > |
CRTP base class for managing asynchronous input operations with protocol processing. More... | |
class | qb::io::async::output< _Derived > |
CRTP base class for managing asynchronous output operations. More... | |
class | qb::io::async::io< _Derived > |
CRTP base class for managing bidirectional asynchronous I/O operations with protocol processing. More... |
Macros | |
#define | Derived static_cast<_Derived &>(*this) |
Functions | |
CREATE_MEMBER_CHECK (Protocol) | |
template<typename _Func> | |
void | qb::io::async::callback (_Func &&func, double timeout=0.) |
Utility function to schedule a callable for execution after a timeout. | |
template<typename _Func, typename Rep, typename Period> | |
void | qb::io::async::callback (_Func &&func, std::chrono::duration< Rep, Period > timeout_duration) |
Core asynchronous I/O class templates for event-driven operations.
This file defines the fundamental class templates for asynchronous I/O operations in the QB IO library. It includes base classes for handling events, timeouts, file watching, and bidirectional I/O with protocol-based message processing.
The classes in this file use the Curiously Recurring Template Pattern (CRTP) to provide static polymorphism, avoiding the overhead of virtual function calls while still allowing customization in derived classes.
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.