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