Skip to content
  • Evan Hunt's avatar
    Refactoring of the asio_link module as preparation for adding a resolver. · d09afbc6
    Evan Hunt authored
    1) The asio_link object no longer directly depends on AuthSrv*; instead
    the caller must provide a pair of callback objects, CheckinProvider and
    DNSProvider, which are called at appropriate times to check for outstanding
    configuration messages and to process a DNS message.
    
    2) In hopes of making it less painful to write the ASIO handlers
    when we add the code to send requests to upstream authoritative
    servers, I rewrote the TCPServer and UDPServer classes to use
    the "stackless coroutine" pattern described at:
    http://blog.think-async.com/2010/03/potted-guide-to-stackless-coroutines.html
    
    The resulting ASIO code should be functionally identical to the
    previous code, but it is shorter and (IMHO) easier to read:
    instead of several different asynchronous response handlers,
    there's a single function for TCP and another for UDP, and the
    I/O operations are all laid out in logical order.
    
    Next step will be to move asio_link into src/lib, but I'm leaving
    it here for now to make it easier to read the diff.
    
    
    git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac327@2934 e5f2f494-b856-4b98-b285-d166d9295462
    d09afbc6