1 #ifndef PROTON_CONNECTION_HPP
2 #define PROTON_CONNECTION_HPP
26 #include "./internal/export.hpp"
27 #include "./internal/object.hpp"
33 #include <proton/type_compat.h>
41 struct pn_connection_t;
47 PN_CPP_CLASS_EXTERN
connection :
public internal::object<pn_connection_t>,
public endpoint {
49 PN_CPP_EXTERN
connection(pn_connection_t* c) : internal::object<pn_connection_t>(c) {}
84 PN_CPP_EXTERN std::string
user()
const;
181 PN_CPP_EXTERN
void wake()
const;
Options for creating a connection.
Definition: connection_options.hpp:67
A connection to a remote AMQP peer.
Definition: connection.hpp:47
uint16_t max_sessions() const
Get the maximum number of open sessions allowed by the remote peer.
session default_session()
Get the default session.
std::vector< symbol > offered_capabilities() const
Unsettled API - Extension capabilities offered by the remote peer.
sender_range senders() const
Return all senders on this connection.
class container & container() const
Get the container.
session open_session()
Open a new session.
void wake() const
Unsettled API - Trigger an event from another thread.
uint32_t max_frame_size() const
Get the maximum frame size allowed by the remote peer.
session_range sessions() const
Return all sessions on this connection.
std::string virtual_host() const
Return the remote AMQP hostname attribute for the connection.
void close()
Close the connection.
receiver_range receivers() const
Return all receivers on this connection.
std::vector< symbol > desired_capabilities() const
Unsettled API - Extension capabilities desired by the remote peer.
connection()
Create an empty connection.
Definition: connection.hpp:54
void close(const error_condition &)
Close the connection.
void open(const connection_options &)
Open the connection.
std::map< symbol, value > properties() const
Unsettled API - Connection properties
std::string user() const
Return authenticated user for the connection Note: The value returned is not stable until the on_tran...
uint32_t idle_timeout() const
Get the idle timeout set by the remote peer.
bool reconnected() const
Unsettled API - True if this connection has been automatically re-connected.
void open()
Open the connection.
void update_options(const connection_options &)
Unsettled API - Update the connection options for this connection
receiver open_receiver(const std::string &addr)
Open a receiver for addr on default_session().
bool uninitialized() const
True if the local end is uninitialized.
receiver open_receiver(const std::string &addr, const receiver_options &)
Open a receiver for addr on default_session().
std::string container_id() const
Return the remote container ID for the connection.
bool active() const
True if the local end is active.
sender open_sender(const std::string &addr, const sender_options &)
Open a sender for addr on default_session().
bool closed() const
True if the local and remote ends are closed.
sender open_sender(const std::string &addr)
Open a sender for addr on default_session().
session open_session(const session_options &)
Open a new session.
A top-level container of connections, sessions, and links.
Definition: container.hpp:49
The base class for session, connection, and link.
Definition: endpoint.hpp:36
Describes an endpoint error state.
Definition: error_condition.hpp:39
Options for creating a receiver.
Definition: receiver_options.hpp:59
A channel for receiving messages.
Definition: receiver.hpp:41
Options for creating a sender.
Definition: sender_options.hpp:60
A channel for sending messages.
Definition: sender.hpp:40
Options for creating a session.
Definition: session_options.hpp:41
A container of senders and receivers.
Definition: session.hpp:42
A network channel supporting an AMQP connection.
Definition: transport.hpp:37
Unsettled API - A context for thread-safe execution of work.
Definition: work_queue.hpp:327
The base class for session, connection, and link.
The main Proton namespace.
Definition: annotation_key.hpp:33
A container of senders and receivers.
The base Proton error.
Definition: error.hpp:40
A string that represents the AMQP symbol type.
A holder for any AMQP value, simple or complex.