On 11/18/2014 02:35 PM, Rafael Schloming wrote:
I would suggest the following options for this particular API point as both
being preferable.

1. if we really want to force people to choose up front, the right way to
do it is with a single constructor:

       pn_transport_t *t = pn_transport(CLIENT); /* or */
pn_transport(SERVER)

     at east this follows our API conventions

2. don't force people to choose up front

       pn_transport_t *t = pn_transport(); // defaults to client
       pn_transport_set_server(t, true);
       pn_transport_is_server(t) --> true

As a general pattern, I prefer to stick with (2).

That seems clearer to me also.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to