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

eagine::msgbus::connection Struct Referenceabstract

Interface for message bus connections. More...

#include <eagine/message_bus/connection.hpp>

Public Types

using fetch_handler = callable_ref< bool(message_id, message_age, const message_view &)>
 Alias for fetch handler callable reference type.
 

Public Member Functions

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

- 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

Interface for message bus connections.

See also
connection_user
acceptor

Member Function Documentation

◆ fetch_messages()

virtual auto eagine::msgbus::connection::fetch_messages ( fetch_handler  handler) -> bool
pure virtual

◆ send()

virtual auto eagine::msgbus::connection::send ( message_id  msg_id,
const message_view  
) -> bool
pure virtual

◆ update()

virtual auto eagine::msgbus::connection::update ( ) -> bool
inlinevirtual

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

See also
send
fetch_messages

Reimplemented in eagine::msgbus::posix_mqueue_connection, eagine::msgbus::posix_mqueue_connector, and eagine::msgbus::direct_client_connection.


The documentation for this struct 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).