Extended proactor functions for native or implementation-specific integration. More...
Go to the source code of this file.
Typedefs | |
| typedef int | pn_socket_t |
Functions | |
| PNP_EXTERN void | pn_proactor_import_socket (pn_proactor_t *proactor, pn_connection_t *connection, pn_transport_t *transport, pn_socket_t fd) |
Import an existing connected socket into the proactor and bind to a connection and transport. | |
Extended proactor functions for native or implementation-specific integration.
| PNP_EXTERN void pn_proactor_import_socket | ( | pn_proactor_t * | proactor, |
| pn_connection_t * | connection, | ||
| pn_transport_t * | transport, | ||
| pn_socket_t | fd ) |
Import an existing connected socket into the proactor and bind to a connection and transport.
Errors are returned as PN_TRANSPORT_CLOSED events by pn_proactor_wait().
The proactor takes ownership of connection and will automatically call pn_connection_free() after the final PN_TRANSPORT_CLOSED event is handled, or when pn_proactor_free() is called. You can prevent the automatic free with pn_proactor_release_connection()
The proactor takes ownership of transport, it will be freed even if pn_proactor_release_connection() is called.
The proactor takes ownership of the socket and will close it when the connection is closed.
| [in] | Proactor | The proactor object. |
| [in] | Connection | The connection object, or NULL to create a new one. |
| [in] | Transport | The transport object, or NULL to create a new one. |
| [in] | fd | The file descriptor or socket handle of the connected socket. |