1 #ifndef PROTON_CPP_SESSION_H
2 #define PROTON_CPP_SESSION_H
25 #include "proton/export.hpp"
26 #include "proton/endpoint.hpp"
27 #include "proton/link.hpp"
29 #include "proton/types.h"
30 #include "proton/link.h"
33 struct pn_connection_t;
46 session(pn_session_t* s=0) : object<pn_session_t>(s) {}
61 PN_CPP_EXTERN
void open();
66 PN_CPP_EXTERN
void close();
69 PN_CPP_EXTERN
class connection connection() const;
79 PN_CPP_EXTERN
receiver create_receiver(
const std::string& name=
"");
86 PN_CPP_EXTERN
sender create_sender(
const std::string& name=
"");
109 class session_iterator :
public iter_base<session> {
113 PN_CPP_EXTERN session_iterator operator++();
114 session_iterator operator++(
int) { session_iterator x(*
this); ++(*this);
return x; }
119 typedef range<session_iterator> session_range;
123 #endif // PROTON_CPP_SESSION_H
void close()
Initiate local close.
A link for sending messages.
Definition: sender.hpp:38
A connection to a remote AMQP peer.
Definition: connection.hpp:42
The base class for session, connection, and link.
Definition: endpoint.hpp:32
A container of links.
Definition: session.hpp:42
Describes an endpoint error state.
Definition: condition.hpp:35
link_range find_links(endpoint::state mask) const
Return the links on this session matching the state mask.
int state
A bit mask of state bit values.
Definition: endpoint.hpp:45
receiver open_receiver(const std::string &addr, const link_options &opts=link_options())
Open a receiver for addr.
Options for creating a link.
Definition: link_options.hpp:60
A link for receiving messages.
Definition: receiver.hpp:36
sender open_sender(const std::string &addr, const link_options &opts=link_options())
Open a sender for addr.
endpoint::state state() const
Get the state of this session.
condition local_condition() const
Get the local error condition.
condition remote_condition() const
Get the error condition of the remote endpoint.