Parcourir la source

[2903] more documentation updates

JINMEI Tatuya il y a 12 ans
Parent
commit
de20a4c519
2 fichiers modifiés avec 6 ajouts et 7 suppressions
  1. 0 7
      src/lib/asiodns/sync_udp_server.cc
  2. 6 0
      src/lib/asiodns/sync_udp_server.h

+ 0 - 7
src/lib/asiodns/sync_udp_server.cc

@@ -93,13 +93,6 @@ SyncUDPServer::handleRead(const asio::error_code& ec, const size_t length) {
     }
     // OK, we have a real packet of data. Let's dig into it!
 
-    // The UDP socket class has been extended with asynchronous functions
-    // and takes as a template parameter a completion callback class.  As
-    // UDPServer does not use these extended functions (only those defined
-    // in the IOSocket base class) - but needs a UDPSocket to get hold of
-    // the underlying Boost UDP socket - DummyIOCallback is used.  This
-    // provides the appropriate operator() but is otherwise functionless.
-
     // Make sure the buffers are fresh.  Note that we don't touch query_
     // because it's supposed to be cleared in lookup_callback_.  We should
     // eventually even remove this member variable (and remove it from

+ 6 - 0
src/lib/asiodns/sync_udp_server.h

@@ -131,10 +131,16 @@ private:
     isc::dns::MessagePtr query_, answer_;
     // The socket used for the communication
     std::auto_ptr<asio::ip::udp::socket> socket_;
+    // Wrapper of socket_ in the form of asiolink::IOSocket.
+    // "DummyIOCallback" is not necessary for this class, but using the
+    // template is the easiest way to create a UDP instance of IOSocket.
     boost::scoped_ptr<asiolink::UDPSocket<asiolink::DummyIOCallback> >
     udp_socket_;
     // Place the socket puts the sender of a packet when it is received
     asio::ip::udp::endpoint sender_;
+    // Wrapper of sender_ in the form of asiolink::IOEndpoint.  It's set to
+    // refer to sender_ on initialization, and keeps the reference throughout
+    // this server class.
     asiolink::UDPEndpoint udp_endpoint_;
     // Callback
     const DNSLookup* lookup_callback_;