qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Conway <acon...@redhat.com>
Subject Re: Review Request 57662: PROTON-1438: C proactor listening behavior
Date Thu, 16 Mar 2017 17:00:46 GMT


> On March 16, 2017, 3:27 p.m., Andrew Stitcher wrote:
> > I've looked this over, and I can't see anything obviously wrong. But there's a lot
of detailed churn in this change, and I'm not so familiar with libuv, so I'm not confident
enough to say "ship it". But I agree with the overall direction.

That'll do :) Churn was hard to avoid since the previous code assumed socket==work item. To
have multi-socket listeners I needed to make the distinction and rename to keep it clear which
touched everything unfortunately. We'll sort out bugs as we find them...


- Alan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/57662/#review169163
-----------------------------------------------------------


On March 15, 2017, 8:35 p.m., Alan Conway wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/57662/
> -----------------------------------------------------------
> 
> (Updated March 15, 2017, 8:35 p.m.)
> 
> 
> Review request for qpid, Andrew Stitcher and Cliff Jansen.
> 
> 
> Bugs: PROTON-1438
>     https://issues.apache.org/jira/browse/PROTON-1438
> 
> 
> Repository: qpid-proton-git
> 
> 
> Description
> -------
> 
> (also available on https://github.com/alanconway/qpid-proton/tree/ipv4-ipv6)
> 
> Improved listening behavior for pn_proactor_listen to allow selective listening by protocol
(ipv4/v6) or portable "listen to everything".
> 
> Host can be a host name, IPV4 or IPV6 literal, or the empty string/NULL (treated the
same). The empty string listens on all local addresses. A host name listens on all addresses
associated with the name. An IPV6 literal address (or wildcard '[::]') listens only for IPV6.
An IPV4 literal address (or wildcard '0.0.0.0') listens only for IPV4.
> 
> - pn_proactor_listen may listen on more than one socket for ipv6/v4 or for DNS names
with multiple address records.
> 
> - the 'backlog' applies to *each* socket
> 
> - an error on any socket will close all the sockets of the listener,  PN_LISTERN_CLOSE
event indicates all sockets are closed and provides the error that triggered the close.
> 
> PROTON-1438: added pn_event_condition convenience function
> 
> A convenience function to make it easier to write generic error handling
> functions for events.
> 
> /*
>  * If the event context object has a condition and the condition is set
>  * return it, otherwise return NULL.
>  * If the event context object has remote and local conditions,
>  * try the remote condition first, then the local.
>  */
> PN_EXTERN struct pn_condition_t *pn_event_condition(pn_event_t *event);
> 
> PROTON-1438: c libuv proactor - separate pn_connection_t on free
> 
> Separate pn_connection_t from proactor internal data structures when the
> proactor frees the connection - in case the application is using refcounting
> to pin the connection.
> 
> 
> Diffs
> -----
> 
>   proton-c/include/proton/cid.h 2d688964cbf2cf17850ee2f4f93eb6c85c7eb1a8 
>   proton-c/include/proton/event.h 6f93cd4d33c121d9265649814f7770a99d61cd45 
>   proton-c/include/proton/listener.h 2038c064a8a4fd621f584fd02db93a6e4593b708 
>   proton-c/include/proton/proactor.h 43b8ccb85525631818b8393c5e7f9b07ae0b348d 
>   proton-c/src/core/engine.c 8c2aeb0d27a06384b7b1dc3488d9bb122dda7bd7 
>   proton-c/src/proactor/libuv.c 102fcdd8a30d2dd57d9545552bcfd695a251a66d 
>   proton-c/src/tests/proactor.c beba46e84c75fb36677576b645fd2f39bb238827 
>   proton-c/src/tests/test_tools.h 9fe679c4ce99f8bd8446343ea180ad10a9a60c7c 
> 
> 
> Diff: https://reviews.apache.org/r/57662/diff/1/
> 
> 
> Testing
> -------
> 
> Passes proton tests, including new proactor.c tests for ipv4/v6 listening and connecting
> 
> 
> Thanks,
> 
> Alan Conway
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message