Qpid Proton C API  0.37.0
link.h File Reference

A channel for transferring messages. More...

#include <proton/import_export.h>
#include <proton/type_compat.h>
#include <proton/condition.h>
#include <proton/terminus.h>
#include <proton/types.h>
#include <proton/object.h>
#include <stddef.h>

Go to the source code of this file.

Enumerations

enum  pn_snd_settle_mode_t { PN_SND_UNSETTLED , PN_SND_SETTLED , PN_SND_MIXED }
 Describes the permitted/expected settlement behaviours of a sending link. More...
 
enum  pn_rcv_settle_mode_t { PN_RCV_FIRST , PN_RCV_SECOND }
 Describes the permitted/expected settlement behaviours of a receiving link. More...
 

Functions

pn_link_tpn_sender (pn_session_t *session, const char *name)
 Construct a new sender on a session. More...
 
pn_link_tpn_receiver (pn_session_t *session, const char *name)
 Construct a new receiver on a session. More...
 
void pn_link_free (pn_link_t *link)
 Free a link object. More...
 
void * pn_link_get_context (pn_link_t *link)
 Get the application context that is associated with a link object. More...
 
void pn_link_set_context (pn_link_t *link, void *context)
 Set a new application context for a link object. More...
 
pn_record_t * pn_link_attachments (pn_link_t *link)
 Get the attachments that are associated with a link object. More...
 
const char * pn_link_name (pn_link_t *link)
 Get the name of a link. More...
 
bool pn_link_is_sender (pn_link_t *link)
 Test if a link is a sender. More...
 
bool pn_link_is_receiver (pn_link_t *link)
 Test if a link is a receiver. More...
 
pn_state_t pn_link_state (pn_link_t *link)
 Get the endpoint state flags for a link. More...
 
pn_error_tpn_link_error (pn_link_t *link)
 Deprecated - Use pn_link_condition(). More...
 
pn_condition_tpn_link_condition (pn_link_t *link)
 Get the local condition associated with a link endpoint. More...
 
pn_condition_tpn_link_remote_condition (pn_link_t *link)
 Get the remote condition associated with a link endpoint. More...
 
pn_session_tpn_link_session (pn_link_t *link)
 Get the parent session for a link object. More...
 
pn_link_tpn_link_head (pn_connection_t *connection, pn_state_t state)
 Retrieve the first link that matches the given state mask. More...
 
pn_link_tpn_link_next (pn_link_t *link, pn_state_t state)
 Retrieve the next link that matches the given state mask. More...
 
void pn_link_open (pn_link_t *link)
 Open a link. More...
 
void pn_link_close (pn_link_t *link)
 Close a link. More...
 
void pn_link_detach (pn_link_t *link)
 Detach a link. More...
 
pn_terminus_tpn_link_source (pn_link_t *link)
 Access the locally defined source definition for a link. More...
 
pn_terminus_tpn_link_target (pn_link_t *link)
 Access the locally defined target definition for a link. More...
 
pn_terminus_tpn_link_remote_source (pn_link_t *link)
 Access the remotely defined source definition for a link. More...
 
pn_terminus_tpn_link_remote_target (pn_link_t *link)
 Access the remotely defined target definition for a link. More...
 
pn_delivery_tpn_link_current (pn_link_t *link)
 Get the current delivery for a link. More...
 
bool pn_link_advance (pn_link_t *link)
 Advance the current delivery of a link to the next delivery on the link. More...
 
int pn_link_credit (pn_link_t *link)
 Get the credit balance for a link. More...
 
int pn_link_queued (pn_link_t *link)
 Get the number of queued deliveries for a link. More...
 
int pn_link_remote_credit (pn_link_t *link)
 Get the remote view of the credit for a link. More...
 
bool pn_link_get_drain (pn_link_t *link)
 Get the drain flag for a link. More...
 
int pn_link_drained (pn_link_t *link)
 Drain excess credit for a link. More...
 
int pn_link_available (pn_link_t *link)
 Get the available deliveries hint for a link. More...
 
pn_snd_settle_mode_t pn_link_snd_settle_mode (pn_link_t *link)
 Get the local sender settle mode for a link. More...
 
pn_rcv_settle_mode_t pn_link_rcv_settle_mode (pn_link_t *link)
 Get the local receiver settle mode for a link. More...
 
void pn_link_set_snd_settle_mode (pn_link_t *link, pn_snd_settle_mode_t mode)
 Set the local sender settle mode for a link. More...
 
void pn_link_set_rcv_settle_mode (pn_link_t *link, pn_rcv_settle_mode_t mode)
 Set the local receiver settle mode for a link. More...
 
pn_snd_settle_mode_t pn_link_remote_snd_settle_mode (pn_link_t *link)
 Get the remote sender settle mode for a link. More...
 
pn_rcv_settle_mode_t pn_link_remote_rcv_settle_mode (pn_link_t *link)
 Get the remote receiver settle mode for a link. More...
 
int pn_link_unsettled (pn_link_t *link)
 Get the number of unsettled deliveries for a link. More...
 
pn_delivery_tpn_unsettled_head (pn_link_t *link)
 Get the first unsettled delivery for a link. More...
 
pn_delivery_tpn_unsettled_next (pn_delivery_t *delivery)
 Get the next unsettled delivery on a link. More...
 
void pn_link_offered (pn_link_t *sender, int credit)
 Signal the availability of deliveries for a link. More...
 
ssize_t pn_link_send (pn_link_t *sender, const char *bytes, size_t n)
 Send message data for the current delivery on a link. More...
 
void pn_link_flow (pn_link_t *receiver, int credit)
 Grant credit for incoming deliveries on a receiver. More...
 
void pn_link_drain (pn_link_t *receiver, int credit)
 Grant credit for incoming deliveries on a receiver, and set drain mode to true. More...
 
void pn_link_set_drain (pn_link_t *receiver, bool drain)
 Set the drain mode on a link. More...
 
ssize_t pn_link_recv (pn_link_t *receiver, char *bytes, size_t n)
 Receive message data for the current delivery on a link. More...
 
bool pn_link_draining (pn_link_t *receiver)
 Check if a link is currently draining. More...
 
uint64_t pn_link_max_message_size (pn_link_t *link)
 Unsettled API - Get the maximum message size for a link. More...
 
void pn_link_set_max_message_size (pn_link_t *link, uint64_t size)
 Unsettled API - Set the maximum message size for a link. More...
 
uint64_t pn_link_remote_max_message_size (pn_link_t *link)
 Unsettled API - Get the remote view of the maximum message size for a link. More...
 
pn_data_tpn_link_properties (pn_link_t *link)
 Access/modify the AMQP properties data for a link object. More...
 
pn_data_tpn_link_remote_properties (pn_link_t *link)
 Access the AMQP link properties supplied by the remote link endpoint. More...
 

Detailed Description

A channel for transferring messages.