You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Alan Conway <ac...@redhat.com> on 2017/04/27 01:13:57 UTC

Review Request 58774: WIP: netaddr passing libuv tests, need epoll

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

Review request for qpid, Andrew Stitcher, Cliff Jansen, and Justin Ross.


Bugs: PROTON-1470
    https://issues.apache.org/jira/browse/PROTON-1470


Repository: qpid-proton-git


Description
-------

Add pn_netaddr_t to meet the following reqiurements:

pn_proactor_connect and listen take a `const char*` string as the network address. This creates ambiguity about what the string means. URLs are complex to parse and construct and pn_url_t has been deprecated because it does not follow the URL standards well. Ad-hoc string formats like "host:port" are confusing since IPv6 host addresses can contains ":" characters.

Provide a simple pn_netaddr_t that can

- provide a unquoted, separate host and port strings to connect and listen
- inspect incoming addresses as standard struct sockaddr
- get a readable, but not parsable, string from any network address
- is extensible, in a binary compatible way, to support other address types for connect/listen in future

Note it is not a requirement (yet) to be able to connect/listen using an arbitrary sockaddr but it should be possible to add such support in future in a source and binary compatible way.


Diffs
-----

  examples/c/proactor/broker.c 6501927115223f15b2a17330fa083422f3f2e4ee 
  examples/c/proactor/direct.c f76895c4cdc331fb3ce1491d49dda21fc91447b6 
  examples/c/proactor/receive.c c8d3363fba4b96de16890673ed91a712f6d38723 
  examples/c/proactor/send.c c21ac68f0793a6d642788dd73025f91dc758bd49 
  examples/c/proactor/test.py 4950cef5b2a113e6e3197eb63465b4950bacdfa3 
  proton-c/CMakeLists.txt b1de95692fed82d14f89fa362a910060afe20053 
  proton-c/include/proton/netaddr.h PRE-CREATION 
  proton-c/include/proton/proactor.h 901bc628ce0120191e79ef93a02b33d0376fbc6a 
  proton-c/src/proactor/epoll.c b1175f4ccc45fb6e9293563ff815bff7dfad5573 
  proton-c/src/proactor/libuv.c 4992b4074111af43ce60f1e87114ae4d57e940fd 
  proton-c/src/proactor/netaddr-internal.h PRE-CREATION 
  proton-c/src/proactor/netaddr.c PRE-CREATION 
  proton-c/src/tests/proactor.c 1365745432be5edff5460b801024c416d8a7c1d7 
  proton-c/src/tests/test_tools.h c5c8364612480156ab670c0bbf0a01a5f1a797d3 


Diff: https://reviews.apache.org/r/58774/diff/1/


Testing
-------

Passes libuv proactor tests, epoll not updated yet.


Thanks,

Alan Conway