Hi Everyone,

I've done some exploratory coding on a small refactor aimed at simplifying
the driver in order to ease both portability and ssl integration. I've
attached the patch. It's not huge, but it removes some of the trickiest
code from driver.c. I believe there are further simplifications that could
be made on top of this, but I think this represents the minimal coherent
step. This involves the following API modifications:

Changed:
  pn_sasl_t *pn_sasl() -> pn_sasl_t *pn_sasl(pn_transport_t *transport)
  pn_transport_t *pn_transport(pn_connection_t *connection) ->
pn_transport_t *pn_transport(void)

Added:
  int pn_transport_bind(pn_transport_t *transport, pn_connection_t
*connection)

Note that a transport can now exist independently from a connection and
must therefore also be explicitly freed.
Note that the sasl object does *not* need to be explicitly freed as it will
be automatically freed when the transport is freed.

If you're using the messenger API or the driver and engine API together,
then there will be no visible changes.

Please have a look and give me any comments I'll be tying up some loose
ends and looking to commit this soon.


--Rafael

Reply via email to