Go to the documentation of this file. 1 #ifndef PROTON_CONNECTION_HPP
2 #define PROTON_CONNECTION_HPP
26 #include "./internal/export.hpp"
27 #include "./internal/object.hpp"
31 #include <proton/type_compat.h>
38 struct pn_connection_t;
44 PN_CPP_CLASS_EXTERN
connection :
public internal::object<pn_connection_t>,
public endpoint {
46 PN_CPP_EXTERN
connection(pn_connection_t* c) : internal::object<pn_connection_t>(c) {}
55 PN_CPP_EXTERN
bool closed()
const;
79 PN_CPP_EXTERN std::string
user()
const;
112 PN_CPP_EXTERN
receiver open_receiver(
const std::string& addr,
164 PN_CPP_EXTERN
void wake()
const;
174 #endif // PROTON_CONNECTION_HPP
Describes an endpoint error state.
Definition: error_condition.hpp:40
class container & container() const
Get the container.
uint32_t max_frame_size() const
Get the maximum frame size allowed by the remote peer.
connection()
Create an empty connection.
Definition: connection.hpp:51
A container of senders and receivers.
session_range sessions() const
Return all sessions on this connection.
void wake() const
Unsettled API - Trigger an event from another thread.
std::string container_id() const
Return the container ID for the connection.
void open(const connection_options &)
Open the connection.
The base Proton error.
Definition: error.hpp:41
A top-level container of connections, sessions, and links.
Definition: container.hpp:50
class work_queue & work_queue() const
Get the work_queue for the connection.
The base class for session, connection, and link.
Definition: endpoint.hpp:37
sender open_sender(const std::string &addr, const sender_options &)
Open a sender for addr on default_session().
Options for creating a receiver.
Definition: receiver_options.hpp:56
A connection to a remote AMQP peer.
Definition: connection.hpp:44
std::string virtual_host() const
Return the AMQP hostname attribute for the connection.
A channel for receiving messages.
Definition: receiver.hpp:41
Options for creating a connection.
Definition: connection_options.hpp:66
void close()
Close the endpoint.
void open()
Open the connection.
std::string user() const
Return authenticated user for the connection Note: The value returned is not stable until the on_tran...
session open_session(const session_options &)
Open a new session.
The base class for session, connection, and link.
Options for creating a sender.
Definition: sender_options.hpp:57
Options for creating a session.
Definition: session_options.hpp:40
A channel for sending messages.
Definition: sender.hpp:40
receiver open_receiver(const std::string &addr)
Open a receiver for addr on default_session().
A network channel supporting an AMQP connection.
Definition: transport.hpp:37
void close(const error_condition &)
Close the endpoint with an error condition.
sender open_sender(const std::string &addr)
Open a sender for addr on default_session().
bool uninitialized() const
True if the local end is uninitialized.
The main Proton namespace.
Definition: annotation_key.hpp:33
receiver_range receivers() const
Return all receivers on this connection.
bool active() const
True if the local end is active.
sender_range senders() const
Return all senders on this connection.
A container of senders and receivers.
Definition: session.hpp:42
uint32_t idle_timeout() const
Get the idle timeout set by the remote peer.
uint16_t max_sessions() const
Get the maximum number of open sessions allowed by the remote peer.
session open_session()
Open a new session.
Unsettled API - A context for thread-safe execution of work.
Definition: work_queue.hpp:339
session default_session()
Get the default session.