proton  0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
transport.h
Go to the documentation of this file.
1 #ifndef PROTON_TRANSPORT_H
2 #define PROTON_TRANSPORT_H 1
3 
4 /*
5  *
6  * Licensed to the Apache Software Foundation (ASF) under one
7  * or more contributor license agreements. See the NOTICE file
8  * distributed with this work for additional information
9  * regarding copyright ownership. The ASF licenses this file
10  * to you under the Apache License, Version 2.0 (the
11  * "License"); you may not use this file except in compliance
12  * with the License. You may obtain a copy of the License at
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing,
17  * software distributed under the License is distributed on an
18  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19  * KIND, either express or implied. See the License for the
20  * specific language governing permissions and limitations
21  * under the License.
22  *
23  */
24 
25 #include <proton/import_export.h>
26 #include <proton/type_compat.h>
27 #include <proton/condition.h>
28 #include <stddef.h>
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 /**
35  * @file
36  *
37  * Transport API for the proton Engine.
38  *
39  * @defgroup transport Transport
40  * @ingroup engine
41  * @{
42  */
43 
44 /**
45  * Holds the trace flags for an AMQP transport.
46  *
47  * The trace flags for an AMQP transport control what sort of
48  * information is logged by an AMQP transport. The following bits can
49  * be set:
50  *
51  * - ::PN_TRACE_OFF
52  * - ::PN_TRACE_RAW
53  * - ::PN_TRACE_FRM
54  * - ::PN_TRACE_DRV
55  * - ::PN_TRACE_EVT
56  *
57  */
58 typedef int pn_trace_t;
59 
60 /**
61  * Callback for customizing logging behaviour.
62  */
63 typedef void (*pn_tracer_t)(pn_transport_t *transport, const char *message);
64 
65 /**
66  * Turn logging off entirely.
67  */
68 #define PN_TRACE_OFF (0)
69 
70 /**
71  * Log raw binary data into/out of the transport.
72  */
73 #define PN_TRACE_RAW (1)
74 
75 /**
76  * Log frames into/out of the transport.
77  */
78 #define PN_TRACE_FRM (2)
79 
80 /**
81  * Log driver related events, e.g. initialization, end of stream, etc.
82  */
83 #define PN_TRACE_DRV (4)
84 
85 /**
86  * Log events
87  */
88 #define PN_TRACE_EVT (8)
89 
90 /**
91  * Factory for creating a transport.
92  * A transport is used by a connection to interface with the network.
93  * There can only be one connection associated with a transport. See
94  * pn_transport_bind().
95  *
96  * Initially a transport is configured to be a client transport. Use pn_transport_set_server()
97  * to configure the transport as a server transport.
98  *
99  * A client transport initiates outgoing connections.
100  *
101  * A client transport must be configured with the protocol layers to use and cannot
102  * configure itself automatically.
103  *
104  * A server transport accepts incoming connections. It can automatically
105  * configure itself to include the various protocol layers depending on
106  * the incoming protocol headers.
107  *
108  * @return pointer to new transport
109  */
111 
112 /**
113  * Configure a transport as a server
114  *
115  * @param[in] transport a transport object
116  */
118 
119 /**
120  * Free a transport object.
121  *
122  * When a transport is freed, it is automatically unbound from its
123  * associated connection.
124  *
125  * @param[in] transport a transport object or NULL
126  */
128 
129 /** Retrieve the authenticated user
130  *
131  * This is usually used at the the server end to find the name of the authenticated user.
132  * On the client it will merely return whatever user was passed in to the
133  * pn_connection_set_user() API of the bound connection.
134  *
135  * The returned value is only reliable after the PN_TRANSPORT_AUTHENTICATED event has been received.
136  *
137  * @param[in] transport the transport
138  *
139  * @return
140  * If a the user is anonymous (either no SASL layer is negotiated or the SASL ANONYMOUS mechanism is used)
141  * then the user will be "anonymous"
142  * Otherwise a string containing the user is returned.
143  */
144 PN_EXTERN const char *pn_transport_get_user(pn_transport_t *transport);
145 
146 /**
147  * Set whether a non authenticated transport connection is allowed
148  *
149  * There are several ways within the AMQP protocol suite to get unauthenticated connections:
150  * - Use no SASL layer (with either no TLS or TLS without client certificates)
151  * - Use an SASL layer but the ANONYMOUS mechanism
152  *
153  * The default if this option is not set is to allow unauthenticated connections.
154  *
155  * @param[in] transport the transport
156  * @param[in] required boolean is true when authenticated connections are required
157  */
158 PN_EXTERN void pn_transport_require_auth(pn_transport_t *transport, bool required);
159 
160 /**
161  * Tell whether the transport connection is authenticated
162  *
163  * Note that this property may not be stable until the PN_CONNECTION_REMOTE_OPEN
164  * event is received.
165  *
166  * @param[in] transport the transport
167  * @return bool representing authentication
168  */
170 
171 /**
172  * Set whether a non encrypted transport connection is allowed
173  *
174  * There are several ways within the AMQP protocol suite to get encrypted connections:
175  * - Use TLS/SSL
176  * - Use an SASL with a mechanism that supports saecurity layers
177  *
178  * The default if this option is not set is to allow unencrypted connections.
179  *
180  * @param[in] transport the transport
181  * @param[in] required boolean is true when encrypted connections are required
182  */
183 PN_EXTERN void pn_transport_require_encryption(pn_transport_t *transport, bool required);
184 
185 /**
186  * Tell whether the transport connection is encrypted
187  *
188  * Note that this property may not be stable until the PN_CONNECTION_REMOTE_OPEN
189  * event is received.
190  *
191  * @param[in] transport the transport
192  * @return bool representing encryption
193  */
195 
196 /**
197  * Get additional information about the condition of the transport.
198  *
199  * When a PN_TRANSPORT_ERROR event occurs, this operation can be used
200  * to access the details of the error condtion.
201  *
202  * The pointer returned by this operation is valid until the
203  * transport object is freed.
204  *
205  * @param[in] transport the transport object
206  * @return the transport's condition object
207  */
209 
210 /**
211  * @deprecated
212  */
214 
215 /**
216  * Binds the transport to an AMQP connection.
217  *
218  * @return an error code, or 0 on success
219  */
220 PN_EXTERN int pn_transport_bind(pn_transport_t *transport, pn_connection_t *connection);
221 
222 /**
223  * Unbinds a transport from its AMQP connection.
224  *
225  * @return an error code, or 0 on success
226  */
228 
229 /**
230  * Update a transports trace flags.
231  *
232  * The trace flags for a transport control what sort of information is
233  * logged. See ::pn_trace_t for more details.
234  *
235  * @param[in] transport a transport object
236  * @param[in] trace the trace flags
237  */
238 PN_EXTERN void pn_transport_trace(pn_transport_t *transport, pn_trace_t trace);
239 
240 /**
241  * Set the tracing function used by a transport.
242  *
243  * The tracing function is called to perform logging. Overriding this
244  * function allows embedding applications to divert the engine's
245  * logging to a place of their choice.
246  *
247  * @param[in] transport a transport object
248  * @param[in] tracer the tracing function
249  */
251 
252 /**
253  * Get the tracning function used by a transport.
254  *
255  * @param[in] transport a transport object
256  * @return the tracing function used by a transport
257  */
259 
260 /**
261  * Get the application context that is associated with a transport object.
262  *
263  * The application context for a transport may be set using
264  * ::pn_transport_set_context.
265  *
266  * @param[in] transport the transport whose context is to be returned.
267  * @return the application context for the transport object
268  */
270 
271 /**
272  * @deprecated
273  * Set a new application context for a transport object.
274  *
275  * The application context for a transport object may be retrieved using
276  * ::pn_transport_get_context.
277  *
278  * @param[in] transport the transport object
279  * @param[in] context the application context
280  */
281 PN_EXTERN void pn_transport_set_context(pn_transport_t *transport, void *context);
282 
283 /**
284  * Get the attachments that are associated with a transport object.
285  *
286  * @param[in] transport the transport whose attachments are to be returned.
287  * @return the attachments for the transport object
288  */
290 
291 /**
292  * Log a message using a transport's logging mechanism.
293  *
294  * This can be useful in a debugging context as the log message will
295  * be prefixed with the transport's identifier.
296  *
297  * @param[in] transport a transport object
298  * @param[in] message the message to be logged
299  */
300 PN_EXTERN void pn_transport_log(pn_transport_t *transport, const char *message);
301 
302 /**
303  * Log a printf formatted message using a transport's logging
304  * mechanism.
305  *
306  * This can be useful in a debugging context as the log message will
307  * be prefixed with the transport's identifier.
308  *
309  * @param[in] transport a transport object
310  * @param[in] fmt the printf formatted message to be logged
311  * @param[in] ap a vector containing the format arguments
312  */
313 PN_EXTERN void pn_transport_vlogf(pn_transport_t *transport, const char *fmt, va_list ap);
314 
315 /**
316  * Log a printf formatted message using a transport's logging
317  * mechanism.
318  *
319  * This can be useful in a debugging context as the log message will
320  * be prefixed with the transport's identifier.
321  *
322  * @param[in] transport a transport object
323  * @param[in] fmt the printf formatted message to be logged
324  */
325 PN_EXTERN void pn_transport_logf(pn_transport_t *transport, const char *fmt, ...);
326 
327 /**
328  * Get the maximum allowed channel for a transport.
329  * This will be the minimum of
330  * 1. limit imposed by this proton implementation
331  * 2. limit imposed by remote peer
332  * 3. limit imposed by this application, using pn_transport_set_channel_max()
333  *
334  * @param[in] transport a transport object
335  * @return the maximum allowed channel
336  */
338 
339 /**
340  * Set the maximum allowed channel number for a transport.
341  * Note that this is the maximum channel number allowed, giving a
342  * valid channel number range of [0..channel_max]. Therefore the
343  * maximum number of simultaineously active channels will be
344  * channel_max plus 1.
345  * You can call this function more than once to raise and lower
346  * the limit your application imposes on max channels for this
347  * transport. However, smaller limits may be imposed by this
348  * library, or by the remote peer.
349  * After the OPEN frame has been sent to the remote peer,
350  * further calls to this function will have no effect.
351  *
352  * @param[in] transport a transport object
353  * @param[in] channel_max the maximum allowed channel
354  * @return PN_OK, or PN_STATE_ERR if it is too late to change channel_max
355  */
356 PN_EXTERN int pn_transport_set_channel_max(pn_transport_t *transport, uint16_t channel_max);
357 
358 /**
359  * Get the maximum allowed channel of a transport's remote peer.
360  *
361  * @param[in] transport a transport object
362  * @return the maximum allowed channel of the transport's remote peer
363  */
365 
366 /**
367  * Get the maximum frame size of a transport.
368  *
369  * @param[in] transport a transport object
370  * @return the maximum frame size of the transport object
371  */
373 
374 /**
375  * Set the maximum frame size of a transport.
376  *
377  * @param[in] transport a transport object
378  * @param[in] size the maximum frame size for the transport object
379  */
380 PN_EXTERN void pn_transport_set_max_frame(pn_transport_t *transport, uint32_t size);
381 
382 /**
383  * Get the maximum frame size of a transport's remote peer.
384  *
385  * @param[in] transport a transport object
386  * @return the maximum frame size of the transport's remote peer
387  */
389 
390 /**
391  * Get the idle timeout for a transport.
392  *
393  * A zero idle timeout means heartbeats are disabled.
394  *
395  * @param[in] transport a transport object
396  * @return the transport's idle timeout
397  */
399 
400 /**
401  * Set the idle timeout for a transport.
402  *
403  * A zero idle timeout means heartbeats are disabled.
404  *
405  * @param[in] transport a transport object
406  * @param[in] timeout the idle timeout for the transport object
407  */
409 
410 /**
411  * Get the idle timeout for a transport's remote peer.
412  *
413  * A zero idle timeout means heartbeats are disabled.
414  *
415  * @param[in] transport a transport object
416  * @return the idle timeout for the transport's remote peer
417  */
419 
420 /**
421  * @deprecated
422  */
423 PN_EXTERN ssize_t pn_transport_input(pn_transport_t *transport, const char *bytes, size_t available);
424 /**
425  * @deprecated
426  */
427 PN_EXTERN ssize_t pn_transport_output(pn_transport_t *transport, char *bytes, size_t size);
428 
429 /**
430  * Get the amount of free space for input following the transport's
431  * tail pointer.
432  *
433  * If the engine is in an exceptional state such as encountering an
434  * error condition or reaching the end of stream state, a negative
435  * value will be returned indicating the condition. If an error is
436  * indicated, futher details can be obtained from
437  * ::pn_transport_error. Calls to ::pn_transport_process may alter the
438  * value of this pointer. See ::pn_transport_process for details.
439  *
440  * @param[in] transport the transport
441  * @return the free space in the transport, PN_EOS or error code if < 0
442  */
444 
445 /**
446  * Get the transport's tail pointer.
447  *
448  * The amount of free space following this pointer is reported by
449  * ::pn_transport_capacity. Calls to ::pn_transport_process may alther
450  * the value of this pointer. See ::pn_transport_process for details.
451  *
452  * @param[in] transport the transport
453  * @return a pointer to the transport's input buffer, NULL if no capacity available.
454  */
455 PN_EXTERN char *pn_transport_tail(pn_transport_t *transport);
456 
457 /**
458  * Pushes the supplied bytes into the tail of the transport.
459  *
460  * This is equivalent to copying @c size bytes afther the tail pointer
461  * and then calling ::pn_transport_process with an argument of @c
462  * size. Only some of the bytes will be copied if there is
463  * insufficienty capacity available. Use ::pn_transport_capacity to
464  * determine how much capacity the transport has.
465  *
466  * @param[in] transport the transport
467  * @param[in] src the start of the data to push into the transport
468  * @param[in] size the amount of data to push into the transport
469  *
470  * @return the number of bytes pushed on success, or error code if < 0
471  */
472 PN_EXTERN ssize_t pn_transport_push(pn_transport_t *transport, const char *src, size_t size);
473 
474 /**
475  * Process input data following the tail pointer.
476  *
477  * Calling this function will cause the transport to consume @c size
478  * bytes of input occupying the free space following the tail pointer.
479  * Calls to this function may change the value of ::pn_transport_tail,
480  * as well as the amount of free space reported by
481  * ::pn_transport_capacity.
482  *
483  * @param[in] transport the transport
484  * @param[in] size the amount of data written to the transport's input buffer
485  * @return 0 on success, or error code if < 0
486  */
487 PN_EXTERN int pn_transport_process(pn_transport_t *transport, size_t size);
488 
489 /**
490  * Indicate that the input has reached End Of Stream (EOS).
491  *
492  * This tells the transport that no more input will be forthcoming.
493  *
494  * @param[in] transport the transport
495  * @return 0 on success, or error code if < 0
496  */
498 
499 /**
500  * Get the number of pending output bytes following the transport's
501  * head pointer.
502  *
503  * If the engine is in an exceptional state such as encountering an
504  * error condition or reaching the end of stream state, a negative
505  * value will be returned indicating the condition. If an error is
506  * indicated, further details can be obtained from
507  * ::pn_transport_error. Calls to ::pn_transport_pop may alter the
508  * value of this pointer. See ::pn_transport_pop for details.
509  *
510  * @param[in] transport the transport
511  * @return the number of pending output bytes, or an error code
512  */
513 PN_EXTERN ssize_t pn_transport_pending(pn_transport_t *transport);
514 
515 /**
516  * Get the transport's head pointer.
517  *
518  * This pointer references queued output data. The
519  * ::pn_transport_pending function reports how many bytes of output
520  * data follow this pointer. Calls to ::pn_transport_pop may alter
521  * this pointer and any data it references. See ::pn_transport_pop for
522  * details.
523  *
524  * @param[in] transport the transport
525  * @return a pointer to the transport's output buffer, or NULL if no pending output.
526  */
527 PN_EXTERN const char *pn_transport_head(pn_transport_t *transport);
528 
529 /**
530  * Copies @c size bytes from the head of the transport to the @c dst
531  * pointer.
532  *
533  * It is an error to call this with a value of @c size that is greater
534  * than the value reported by ::pn_transport_pending.
535  *
536  * @param[in] transport the transport
537  * @param[out] dst the destination buffer
538  * @param[in] size the capacity of the destination buffer
539  * @return number of bytes copied on success, or error code if < 0
540  */
541 PN_EXTERN ssize_t pn_transport_peek(pn_transport_t *transport, char *dst, size_t size);
542 
543 /**
544  * Removes @c size bytes of output from the pending output queue
545  * following the transport's head pointer.
546  *
547  * Calls to this function may alter the transport's head pointer as
548  * well as the number of pending bytes reported by
549  * ::pn_transport_pending.
550  *
551  * @param[in] transport the transport
552  * @param[in] size the number of bytes to remove
553  */
554 PN_EXTERN void pn_transport_pop(pn_transport_t *transport, size_t size);
555 
556 /**
557  * Indicate that the output has closed.
558  *
559  * This tells the transport that no more output will be popped.
560  *
561  * @param[in] transport the transport
562  * @return 0 on success, or error code if < 0
563  */
565 
566 /**
567  * Check if a transport has buffered data.
568  *
569  * @param[in] transport a transport object
570  * @return true if the transport has buffered data, false otherwise
571  */
573 
574 /**
575  * Check if a transport is closed.
576  *
577  * A transport is defined to be closed when both the tail and the head
578  * are closed. In other words, when both ::pn_transport_capacity() < 0
579  * and ::pn_transport_pending() < 0.
580  *
581  * @param[in] transport a transport object
582  * @return true if the transport is closed, false otherwise
583  */
585 
586 /**
587  * Process any pending transport timer events.
588  *
589  * This method should be called after all pending input has been
590  * processed by the transport (see ::pn_transport_input), and before
591  * generating output (see ::pn_transport_output). It returns the
592  * deadline for the next pending timer event, if any are present.
593  *
594  * @param[in] transport the transport to process.
595  * @param[in] now the current time
596  *
597  * @return if non-zero, then the expiration time of the next pending timer event for the
598  * transport. The caller must invoke pn_transport_tick again at least once at or before
599  * this deadline occurs.
600  */
602 
603 /**
604  * Get the number of frames output by a transport.
605  *
606  * @param[in] transport a transport object
607  * @return the number of frames output by the transport
608  */
609 PN_EXTERN uint64_t pn_transport_get_frames_output(const pn_transport_t *transport);
610 
611 /**
612  * Get the number of frames input by a transport.
613  *
614  * @param[in] transport a transport object
615  * @return the number of frames input by the transport
616  */
617 PN_EXTERN uint64_t pn_transport_get_frames_input(const pn_transport_t *transport);
618 
619 /** Access the AMQP Connection associated with the transport.
620  *
621  * @param[in] transport a transport object
622  * @return the connection context for the transport, or NULL if
623  * none
624  */
626 
627 #ifdef __cplusplus
628 }
629 #endif
630 
631 /** @}
632  */
633 
634 #endif /* transport.h */
PN_EXTERN void pn_transport_free(pn_transport_t *transport)
Free a transport object.
PN_EXTERN uint64_t pn_transport_get_frames_output(const pn_transport_t *transport)
Get the number of frames output by a transport.
PN_EXTERN bool pn_transport_is_encrypted(pn_transport_t *transport)
Tell whether the transport connection is encrypted.
PN_EXTERN void pn_transport_set_tracer(pn_transport_t *transport, pn_tracer_t tracer)
Set the tracing function used by a transport.
PN_EXTERN void pn_transport_require_encryption(pn_transport_t *transport, bool required)
Set whether a non encrypted transport connection is allowed.
PN_EXTERN pn_tracer_t pn_transport_get_tracer(pn_transport_t *transport)
Get the tracning function used by a transport.
PN_EXTERN uint16_t pn_transport_get_channel_max(pn_transport_t *transport)
Get the maximum allowed channel for a transport.
PN_EXTERN bool pn_transport_quiesced(pn_transport_t *transport)
Check if a transport has buffered data.
PN_EXTERN pn_connection_t * pn_transport_connection(pn_transport_t *transport)
Access the AMQP Connection associated with the transport.
void(* pn_tracer_t)(pn_transport_t *transport, const char *message)
Callback for customizing logging behaviour.
Definition: transport.h:63
PN_EXTERN void pn_transport_set_context(pn_transport_t *transport, void *context)
uint32_t pn_millis_t
Definition: types.h:47
struct pn_record_t pn_record_t
Definition: object.h:46
PN_EXTERN ssize_t pn_transport_push(pn_transport_t *transport, const char *src, size_t size)
Pushes the supplied bytes into the tail of the transport.
struct pn_transport_t pn_transport_t
An AMQP Transport object.
Definition: types.h:262
PN_EXTERN pn_millis_t pn_transport_get_idle_timeout(pn_transport_t *transport)
Get the idle timeout for a transport.
PN_EXTERN const char * pn_transport_get_user(pn_transport_t *transport)
Retrieve the authenticated user.
PN_EXTERN void pn_transport_log(pn_transport_t *transport, const char *message)
Log a message using a transport&#39;s logging mechanism.
PN_EXTERN int pn_transport_process(pn_transport_t *transport, size_t size)
Process input data following the tail pointer.
PN_EXTERN bool pn_transport_is_authenticated(pn_transport_t *transport)
Tell whether the transport connection is authenticated.
PN_EXTERN uint32_t pn_transport_get_remote_max_frame(pn_transport_t *transport)
Get the maximum frame size of a transport&#39;s remote peer.
#define PN_EXTERN
Definition: import_export.h:53
PN_EXTERN pn_condition_t * pn_transport_condition(pn_transport_t *transport)
Get additional information about the condition of the transport.
PN_EXTERN void pn_transport_pop(pn_transport_t *transport, size_t size)
Removes size bytes of output from the pending output queue following the transport&#39;s head pointer...
PN_EXTERN char * pn_transport_tail(pn_transport_t *transport)
Get the transport&#39;s tail pointer.
The Condition API for the proton Engine.
PN_EXTERN void pn_transport_trace(pn_transport_t *transport, pn_trace_t trace)
Update a transports trace flags.
PN_EXTERN void pn_transport_set_idle_timeout(pn_transport_t *transport, pn_millis_t timeout)
Set the idle timeout for a transport.
PN_EXTERN ssize_t pn_transport_peek(pn_transport_t *transport, char *dst, size_t size)
Copies size bytes from the head of the transport to the dst pointer.
PN_EXTERN int pn_transport_set_channel_max(pn_transport_t *transport, uint16_t channel_max)
Set the maximum allowed channel number for a transport.
PN_EXTERN ssize_t pn_transport_input(pn_transport_t *transport, const char *bytes, size_t available)
PN_EXTERN pn_millis_t pn_transport_get_remote_idle_timeout(pn_transport_t *transport)
Get the idle timeout for a transport&#39;s remote peer.
PN_EXTERN uint16_t pn_transport_remote_channel_max(pn_transport_t *transport)
Get the maximum allowed channel of a transport&#39;s remote peer.
PN_EXTERN uint64_t pn_transport_get_frames_input(const pn_transport_t *transport)
Get the number of frames input by a transport.
PN_EXTERN int pn_transport_close_tail(pn_transport_t *transport)
Indicate that the input has reached End Of Stream (EOS).
PN_EXTERN pn_transport_t * pn_transport(void)
Factory for creating a transport.
PN_EXTERN int pn_transport_close_head(pn_transport_t *transport)
Indicate that the output has closed.
PN_EXTERN ssize_t pn_transport_output(pn_transport_t *transport, char *bytes, size_t size)
int pn_trace_t
Holds the trace flags for an AMQP transport.
Definition: transport.h:58
PN_EXTERN bool pn_transport_closed(pn_transport_t *transport)
Check if a transport is closed.
PN_EXTERN pn_record_t * pn_transport_attachments(pn_transport_t *transport)
Get the attachments that are associated with a transport object.
int64_t pn_timestamp_t
Definition: types.h:51
struct pn_error_t pn_error_t
A pn_error_t has an int error code and some string text to describe the error.
Definition: error.h:33
PN_EXTERN void pn_transport_vlogf(pn_transport_t *transport, const char *fmt, va_list ap)
Log a printf formatted message using a transport&#39;s logging mechanism.
struct pn_connection_t pn_connection_t
An AMQP Connection object.
Definition: types.h:118
PN_EXTERN int pn_transport_unbind(pn_transport_t *transport)
Unbinds a transport from its AMQP connection.
struct pn_condition_t pn_condition_t
An AMQP Condition object.
Definition: condition.h:64
PN_EXTERN void pn_transport_set_max_frame(pn_transport_t *transport, uint32_t size)
Set the maximum frame size of a transport.
PN_EXTERN void pn_transport_logf(pn_transport_t *transport, const char *fmt,...)
Log a printf formatted message using a transport&#39;s logging mechanism.
PN_EXTERN void pn_transport_require_auth(pn_transport_t *transport, bool required)
Set whether a non authenticated transport connection is allowed.
PN_EXTERN int pn_transport_bind(pn_transport_t *transport, pn_connection_t *connection)
Binds the transport to an AMQP connection.
PN_EXTERN uint32_t pn_transport_get_max_frame(pn_transport_t *transport)
Get the maximum frame size of a transport.
PN_EXTERN pn_timestamp_t pn_transport_tick(pn_transport_t *transport, pn_timestamp_t now)
Process any pending transport timer events.
PN_EXTERN ssize_t pn_transport_capacity(pn_transport_t *transport)
Get the amount of free space for input following the transport&#39;s tail pointer.
PN_EXTERN void pn_transport_set_server(pn_transport_t *transport)
Configure a transport as a server.
PN_EXTERN ssize_t pn_transport_pending(pn_transport_t *transport)
Get the number of pending output bytes following the transport&#39;s head pointer.
PN_EXTERN pn_error_t * pn_transport_error(pn_transport_t *transport)
PN_EXTERN void * pn_transport_get_context(pn_transport_t *transport)
Get the application context that is associated with a transport object.
PN_EXTERN const char * pn_transport_head(pn_transport_t *transport)
Get the transport&#39;s head pointer.