sender

A channel for sending messages. More...

`#include <sender.hpp>`

Inheritance diagram for sender:
[legend]
Collaboration diagram for sender:
[legend]

## Public Member Functions

| sender ()
| Create an empty sender.
void | open ()
| Open the sender. More...
void | open (const sender_options &opts)
| Open the sender. More...
tracker | send (const message &m)
| Send a message on the sender.
class source | source () const
| Get the source node.
class target | target () const
| Get the target node.
void | return_credit ()
| Experimental - Return all unused credit to the receiver in response to a drain request. More...
bool | uninitialized () const
| True if the local end is uninitialized.
bool | active () const
| True if the local end is active.
bool | closed () const
| True if the local and remote ends are closed.
class error_condition | error () const
| Get the error condition of the remote endpoint.
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 ()
| Experimental - 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 connection | connection () const
| The connection that owns this link.
class session | session () const
| The session that owns this link.

## Detailed Description

A channel for sending messages.

Examples:
  broker.cpp, broker.hpp, client.cpp, direct_send.cpp, helloworld.cpp, helloworld_direct.cpp, mt/broker.cpp, server_direct.cpp, service_bus.cpp, and simple_send.cpp.

## Member Function Documentation

## close() [1/2]

void close | ( |  | ) |

virtual inherited

Close the endpoint.

See also
  endpoint_lifecycle

Implements endpoint.

Examples:
  broker.cpp, direct_recv.cpp, helloworld.cpp, helloworld_direct.cpp, service_bus.cpp, and simple_recv.cpp.

## close() [2/2]

void close | ( | const error_condition & |  | ) |

virtual inherited

Close the endpoint with an error condition.

See also
  endpoint_lifecycle

Implements endpoint.

## detach()

void detach | ( |  | ) |

inherited

Suspend the link without closing it.

A suspended link may be reopened with the same or different link options if supported by the peer. A suspended durable subscription becomes inactive without cancelling it.

## draining()

bool draining | ( |  | ) |

inherited

Experimental - True for a receiver if a drain cycle has been started and the corresponding `on_receiver_drain_finish` event is still pending.

True for a sender if the receiver has requested a drain of credit and the sender has unused credit.

See also
  receiver::drain.

## open() [1/2]

void open | ( |  | ) |

Open the sender.

See also
  endpoint_lifecycle

Examples:
  broker.cpp, broker.hpp, and server_direct.cpp.

## open() [2/2]

void open | ( | const sender_options & | opts | ) |

Open the sender.

See also
  endpoint_lifecycle

## return_credit()

void return_credit | ( |  | ) |

Experimental - Return all unused credit to the receiver in response to a drain request.

Has no effect unless there has been a drain request and there is remaining credit to use or return.

See also
  receiver::drain

The documentation for this class was generated from the following file:

- proton/sender.hpp