qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: Request for Proton code review: IO layer refactor.
Date Tue, 18 Nov 2014 14:49:15 GMT
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: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Mime
View raw message