src/Network/TCP.hh
changeset 400 d64bf28c4340
parent 381 9b35bc329d23
--- a/src/Network/TCP.hh	Fri Jan 16 21:24:45 2009 +0200
+++ b/src/Network/TCP.hh	Fri Jan 16 22:03:49 2009 +0200
@@ -1,6 +1,12 @@
 #ifndef NETWORK_TCP_HH
 #define NETWORK_TCP_HH
 
+/**
+ * @file
+ *
+ * Simple message-based TCP implementation
+ */
+
 #include <ClanLib/core.h>
 
 #include "Socket.hh"
@@ -19,7 +25,12 @@
 // @}
 
 /**
- * A connected TCP socket, so either a client or a server-accept socket
+ * A connected TCP socket, so either a client or a server's accept'd socket. Can be used to send/receive messages.
+ *
+ * Not instanted directly, use NetworkTCPServer/NetworkTCPClient.
+ *
+ * Most of the functionality is present in NetworkSocket/NetworkBuffer*, so mostly this just implements the
+ * higher-level logic for reading messages, triggering signals, driving connect/listen and maintaing the poll flags.
  */
 class NetworkTCPTransport {
     protected:
@@ -120,7 +131,8 @@
 
     public:
         /**
-         * Listen on the specific address.
+         * Listen on the specific endpoint for incoming client connections. \a listen_addr may be a hostname, a
+         * suitable address will be chosen.
          */
         NetworkTCPServer (const NetworkEndpoint &listen_addr);
 
@@ -158,7 +170,10 @@
 class NetworkTCPClient : public NetworkTCPTransport {
     public:
         /**
-         * Create a NetworkTCPTransport, and then connect our socket to the given address.
+         * Create a NetworkTCPTransport, and then connect our socket to the given remote endpoint
+         *
+         * This is address-family-agnostic, and fully supports endpoints with multiple addresses. They will be tried in
+         * turn until one works.
          *
          * @param connect_addr the address to connect to
          */