|
| client (socket_type socket) |
| The constructor. More...
|
|
socket_type & | socket () noexcept |
| Get the underlying socket.
|
|
const socket_type & | socket () const noexcept |
| Get the underlying socket, const.
|
|
void | set_buffer_reserve_size (std::size_t size) noexcept |
| Set the size reserved by the reception buffer.
|
|
std::size_t | get_buffer_reserve_size () const noexcept |
| Get the size reserved by the reception buffer.
|
|
executor_type | get_executor () |
| Get the executor associated with the object.
|
|
void | cancel (id_type id) |
| Cancel a pending call. More...
|
|
void | cancel () |
| Cancel all pending calls. More...
|
|
template<typename NotifyHandler PACKIO_DEFAULT_COMPLETION_TOKEN_TYPE, typename ArgsTuple , typename = std::enable_if_t<internal::is_tuple_v<ArgsTuple>>> |
auto | async_notify (std::string_view name, ArgsTuple &&args, NotifyHandler &&handler=typename net::default_completion_token< executor_type >::type()) |
| Send a notify request to the server with argument. More...
|
|
template<typename NotifyHandler PACKIO_DEFAULT_COMPLETION_TOKEN_TYPE, typename = std::enable_if_t<!internal::is_tuple_v<NotifyHandler>>> |
auto | async_notify (std::string_view name, NotifyHandler &&handler=typename net::default_completion_token< executor_type >::type()) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
|
template<typename CallHandler PACKIO_DEFAULT_COMPLETION_TOKEN_TYPE, typename ArgsTuple , typename = std::enable_if_t<internal::is_tuple_v<ArgsTuple>>> |
auto | async_call (std::string_view name, ArgsTuple &&args, CallHandler &&handler=typename net::default_completion_token< executor_type >::type(), std::optional< std::reference_wrapper< id_type >> call_id=std::nullopt) |
| Call a remote procedure. More...
|
|
template<typename CallHandler PACKIO_DEFAULT_COMPLETION_TOKEN_TYPE, typename = std::enable_if_t<!internal::is_tuple_v<CallHandler>>> |
auto | async_call (std::string_view name, CallHandler &&handler=typename net::default_completion_token< executor_type >::type(), std::optional< std::reference_wrapper< id_type >> call_id=std::nullopt) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
|
template<typename Rpc , typename Socket , template< class... > class Map = default_map>
template<typename NotifyHandler PACKIO_DEFAULT_COMPLETION_TOKEN_TYPE, typename ArgsTuple , typename = std::enable_if_t<internal::is_tuple_v<ArgsTuple>>>
auto packio::client< Rpc, Socket, Map >::async_notify |
( |
std::string_view |
name, |
|
|
ArgsTuple && |
args, |
|
|
NotifyHandler && |
handler = typename net::default_completion_token< executor_type >::type() |
|
) |
| |
|
inline |
Send a notify request to the server with argument.
A notify request will call the remote procedure but does not expect a response
- Parameters
-
name | Remote procedure name to call |
args | Tuple of arguments to pass to the remote procedure |
handler | Handler called after the notify request is sent. Must satisfy the traits::NotifyHandler trait |