Skip to content

Version 0.5 - Refactored network address classes

Pre-release
Pre-release
Compare
Choose a tag to compare
@fpagliughi fpagliughi released this 06 Aug 05:39
· 191 commits to master since this release

Version 0.5 refactored the network address classes with an abstract base class and reduced redundant code with templates to create implementations for the different address families.

  • (Breaking change) Updated the hierarchy of network address classes, now derived from a common base class.
    • Removed sock_address_ref class. Now a C++ reference to sock_address will replace it (i.e. sock_address&).
    • sock_address is now an abstract base class.
    • All the network address classes now derive from sock_address
    • Consolidates a number of overloaded functions that took different forms of addresses to just take a const sock_address&
    • Adds a new sock_address_any class that can contain any address, and is used by base classes that need a generic address.
  • The acceptor and connector classes are still concrete, generic classes, but now a template derives from each of them to specialize.
  • The connector and acceptor classes for each address family (tcp_connector, tcp_acceptor, tcp6_connector, etc) are now typedef'ed to template specializations.
  • The acceptor::bind() and acceptor::listen() methods are now public.
  • CMake build now honors the CMAKE_BUILD_TYPE flag.