• Patric Stout authored
     
    Browse Code »
  • This is a breaking API change.
    
    The whole interface of this library now uses "std::string_view"
    instead of "std::string" / "std::string &". In result, we can
    now promise to only copy data once thoughout the library.
    
    For subscriptions, this is a copy once to read the data from the
    socket into a buffer.
    
    For publish, this is a copy once to write the data in a buffer
    to send over the socket.
    
    For publish, this doesn't change the memory footprint, as because
    "std::string &" was already taking care of this. For subscriptions
    however, it reduces the memory usage by a factor of three. And as
    result it helps with the throughput.
    Patric Stout authored
     
    Browse Code »





  • By using Happy Eyeballs, we stagger connections of a host resolves
    into multiple IPs. This is useful for IPv6 / IPv4 hosts, where
    one of the two can stutter.
    
    Sadly, creating a connection is rather complex, with many odd
    things that can happen along the way. For example, a writeable
    socket doesn't mean it is actually connected; it can also mean
    the socket is in an error state.
    
    This implementation is inspired by my own work on OpenTTD's
    variant of this.
    Patric Stout authored
     
    Browse Code »