Examines the state of each Link owned by the connection and returns the first Link that matches the given state mask. If state contains both local and remote flags, then an exact match against those flags is performed. If state contains only local or only remote flags, then a match occurs if any of the local or remote flags are set respectively.

Parameters:

[in]

connection

to be searched for matching Links

[in]

state

mask to match

Returns:

the first Link owned by the connection that matches the mask, else NULL if no Links match

Examines the state of each session owned by the connection, and returns the first Session that matches the given state mask. If state contains both local and remote flags, then an exact match against those flags is performed. If state contains only local or only remote flags, then a match occurs if any of the local or remote flags are set respectively.

Parameters:

[in]

connection

to be searched for matching sessions

[in]

state

mask to match

Returns:

the first session owned by the connection that matches the mask, else NULL if no sessions match

Report the amount of free space for input following the transport's tail pointer. If the engine is in an exceptional state such as encountering an error condition or reaching the end of stream state, a negative value will be returned indicating the condition. If an error is indicated, futher details can be obtained from pn_transport_error. Calls to pn_transport_process may alter the value of this pointer. See pn_transport_process for details.

Return the transport's head pointer. This pointer references queued output data. The pn_transport_pending function reports how many bytes of output data follow this pointer. Calls to pn_transport_pop may alter this pointer and any data it references. See pn_transport_pop for details.

Parameters:

[in]

transport

the transport

Returns:

a pointer to the transport's output buffer, or NULL if no pending output.

Report the number of pending output bytes following the transport's head pointer. If the engine is in an exceptional state such as encountering an error condition or reaching the end of stream state, a negative value will be returned indicating the condition. If an error is indicated, further details can be obtained from pn_transport_error. Calls to pn_transport_pop may alter the value of this pointer. See pn_transport_pop for details.

Removes ::size bytes of output from the pending output queue following the transport's head pointer. Calls to this function may alter the transport's head pointer as well as the number of pending bytes reported by pn_transport_pending.

Process input data following the tail pointer. Calling this function will cause the transport to consume ::size bytes of input occupying the free space following the tail pointer. Calls to this function may change the value of pn_transport_tail, as well as the amount of free space reported by pn_transport_capacity.

Pushes the supplied bytes into the tail of the transport. This is equivalent to copying ::size bytes afther the tail pointer and then calling pn_transport_process with an argument of ::size. It is an error to call this with a size larger than the capacity reported by pn_transport_capacity.

This method should be called after all pending input has been processed by the transport (see pn_transport_input), and before generating output (see pn_transport_output). It returns the deadline for the next pending timer event, if any are present.

Parameters:

[in]

transport

the transport to process.

Returns:

if non-zero, then the expiration time of the next pending timer event for the transport. The caller must invoke pn_transport_tick again at least once at or before this deadline occurs.

Extracts the first delivery on the connection that has pending operations.

Retrieves the first delivery on the Connection that has pending operations. A readable delivery indicates message data is waiting to be read. A writable delivery indicates that message data may be sent. An updated delivery indicates that the delivery's disposition has changed. A delivery will never be both readable and writible, but it may be both readable and updated or both writiable and updated.

Parameters:

[in]

connection

the connection

Returns:

the first delivery object that needs to be serviced, else NULL if none