qb  2.0.0.0
C++17 Actor Framework
qb Issue Watch Star Fork Follow @isndev
Loading...
Searching...
No Matches
client.h
Go to the documentation of this file.
1
24
25#ifndef QB_IO_ASYNC_UDP_CLIENT_H
26#define QB_IO_ASYNC_UDP_CLIENT_H
27
28#include "../../transport/udp.h"
29#include "../io.h"
30
31namespace qb::io::async::udp {
32
44template <typename _Derived>
45class client
46 : public io<_Derived>
47 , public transport::udp {
48public:
49 constexpr static const bool has_server =
50 false;
51
59 client() noexcept {
60 if constexpr (has_member_Protocol<_Derived>::value) {
61 if constexpr (!std::is_void_v<typename _Derived::Protocol>) {
63 static_cast<_Derived &>(*this));
64 }
65 }
66 }
67};
68
69} // namespace qb::io::async::udp
70
71#endif // QB_IO_ASYNC_UDP_CLIENT_H
_Protocol * switch_protocol(_Args &&...args)
Switches to a new protocol for I/O processing, taking ownership.
Definition io.h:988
io()=default
Default constructor.
static constexpr const bool has_server
Flag indicating server association (false for UDP clients)
Definition client.h:49
client() noexcept
Constructor.
Definition client.h:59
UDP transport providing connectionless, datagram-based communication.
Definition udp.h:44
Core asynchronous I/O class templates for event-driven operations.
UDP datagram transport implementation for the QB IO library.