OGLplus  (0.59.0) a C++ wrapper for rendering APIs

eagine::msgbus::direct_client_connection Class Reference

Implementation of client-side direct connection. More...

#include <eagine/message_bus/direct.hpp>

Public Member Functions

auto is_usable () -> bool final
 Checks if the connection is in usable state.
 
auto update () -> bool final
 Updates the internal state of the connection (called repeatedly). More...
 
auto send (message_id msg_id, const message_view &message) -> bool final
 Sent a message with the specified id. More...
 
auto fetch_messages (connection::fetch_handler handler) -> bool final
 Fetch all enqueued messages that have been received since last fetch. More...
 
void cleanup () final
 Cleans up the connection before destroying it.
 
- Public Member Functions inherited from eagine::msgbus::direct_connection_info< connection >
auto kind () -> connection_kind final
 
auto addr_kind () -> connection_addr_kind final
 
auto type_id () -> identifier final
 
- Public Member Functions inherited from eagine::msgbus::connection
virtual auto max_data_size () -> valid_if_positive< span_size_t >
 Returns the maximum data block size in bytes that can be sent.
 
- Public Member Functions inherited from eagine::interface< connection_info >
constexpr interface (const interface &)=delete
 Not copyable.
 
auto operator= (interface &&)=delete
 Not move assignable.
 
auto operator= (const interface &)=delete
 Not copy assignable.
 

Additional Inherited Members

- Public Types inherited from eagine::msgbus::connection
using fetch_handler = callable_ref< bool(message_id, message_age, const message_view &)>
 Alias for fetch handler callable reference type.
 
- Protected Member Functions inherited from eagine::interface< connection_info >
constexpr interface () noexcept=default
 Default constructible by derived.
 
constexpr interface (interface &&) noexcept=default
 Move constructible by derived.
 

Detailed Description

Implementation of client-side direct connection.

See also
direct_server_connection
direct_acceptor
direct_connection_factory

Member Function Documentation

◆ fetch_messages()

auto eagine::msgbus::direct_client_connection::fetch_messages ( connection::fetch_handler  handler) -> bool
inlinefinalvirtual

Fetch all enqueued messages that have been received since last fetch.

See also
send
update

Implements eagine::msgbus::connection.

◆ send()

auto eagine::msgbus::direct_client_connection::send ( message_id  msg_id,
const message_view  
) -> bool
inlinefinalvirtual

Sent a message with the specified id.

See also
fetch_messages
update

Implements eagine::msgbus::connection.

◆ update()

auto eagine::msgbus::direct_client_connection::update ( ) -> bool
inlinefinalvirtual

Updates the internal state of the connection (called repeatedly).

See also
send
fetch_messages

Reimplemented from eagine::msgbus::connection.


The documentation for this class was generated from the following file:

Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).