A channel for receiving messages. More...
#include <receiver.hpp>
Public Member Functions | |
receiver ()=default | |
Create an empty receiver. | |
void | open () |
Open the receiver. | |
void | open (const receiver_options &opts) |
Open the receiver. More... | |
class source | source () const |
Get the source node. | |
class target | target () const |
Get the target node. | |
void | add_credit (uint32_t) |
Increment the credit available to the sender. More... | |
void | drain () |
Unsettled API - Commence a drain cycle. More... | |
Public Member Functions inherited from link | |
link () | |
Create an empty link. | |
bool | uninitialized () const |
True if the local end is uninitialized. More... | |
bool | active () const |
True if the local end is active. More... | |
bool | closed () const |
True if the local and remote ends are closed. More... | |
class error_condition | error () const |
Get the error condition of the remote endpoint. More... | |
void | close () |
Close the endpoint. More... | |
void | close (const error_condition &) |
Close the endpoint with an error condition. More... | |
void | detach () |
Suspend the link without closing it. More... | |
int | credit () const |
Credit available on the link. | |
bool | draining () |
Unsettled API - True for a receiver if a drain cycle has been started and the corresponding on_receiver_drain_finish event is still pending. More... | |
std::string | name () const |
Get the link name. | |
class container & | container () const |
The container for this link. | |
class work_queue & | work_queue () const |
Get the work_queue for the link. | |
class connection | connection () const |
The connection that owns this link. | |
class session | session () const |
The session that owns this link. | |
std::map< symbol, value > | properties () const |
Unsettled API - Properties supplied by the remote link endpoint. | |
void | user_data (void *user_data) const |
Set user data on this link. | |
void * | user_data () const |
Get user data from this link. | |
virtual bool | uninitialized () const =0 |
True if the local end is uninitialized. More... | |
virtual bool | active () const =0 |
True if the local end is active. More... | |
virtual bool | closed () const =0 |
True if the local and remote ends are closed. More... | |
virtual class error_condition | error () const =0 |
Get the error condition of the remote endpoint. More... | |
virtual void | close ()=0 |
Close the endpoint. More... | |
virtual void | close (const error_condition &)=0 |
Close the endpoint with an error condition. More... | |
A channel for receiving messages.
void open | ( | const receiver_options & | opts | ) |
Open the receiver.
void add_credit | ( | uint32_t | ) |
Increment the credit available to the sender.
Credit granted during a drain cycle is not communicated to the receiver until the drain completes.
void drain | ( | ) |
Unsettled API - Commence a drain cycle.
If there is positive credit, a request is sent to the sender to immediately use up all of the existing credit balance by sending messages that are immediately available and releasing any unused credit (see sender::return_credit). Throws proton::error if a drain cycle is already in progress. An on_receiver_drain_finish event will be generated when the outstanding drained credit reaches zero.