gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r24431 - gnunet/src/transport


From: gnunet
Subject: [GNUnet-SVN] r24431 - gnunet/src/transport
Date: Fri, 19 Oct 2012 17:20:54 +0200

Author: wachs
Date: 2012-10-19 17:20:54 +0200 (Fri, 19 Oct 2012)
New Revision: 24431

Modified:
   gnunet/src/transport/plugin_transport_http_client.c
Log:
- figure out http_client overhead


Modified: gnunet/src/transport/plugin_transport_http_client.c
===================================================================
--- gnunet/src/transport/plugin_transport_http_client.c 2012-10-19 14:59:57 UTC 
(rev 24430)
+++ gnunet/src/transport/plugin_transport_http_client.c 2012-10-19 15:20:54 UTC 
(rev 24431)
@@ -186,6 +186,12 @@
   void *client_get;
 
   /**
+   * Outbound overhead due to HTTP connection
+   * Add to next message of this session when calling callback
+   */
+  size_t overhead;
+
+  /**
    * next pointer for double linked list
    */
   struct HTTP_Message *msg_head;
@@ -358,7 +364,14 @@
   return GNUNET_NO;
 }
 
-#if VERBOSE_CURL
+static void
+client_remark_outbound_overhead (void *cls, size_t size)
+{
+  //FIXME use this overhead
+  GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "transport-http_client",
+                   "Overhead: %u\n", size);
+}
+
 /**
  * Function to log curl debug messages with GNUNET_log
  *
@@ -386,12 +399,13 @@
         break;
       case CURLINFO_HEADER_OUT:
         ttype = "HEADER_OUT";
+        client_remark_outbound_overhead (cls, size);
         break;
       default:
         ttype = "UNSPECIFIED";
         break;
     }
-
+#if VERBOSE_CURL
     memcpy (text, data, size);
     if (text[size - 1] == '\n')
       text[size] = '\0';
@@ -408,11 +422,12 @@
                      "Connection %p %s: %s", cls, ttype, text);
 #endif
   }
+#endif
   return 0;
 }
-#endif
 
 
+
 /**
  * Function that can be used by the transport service to transmit
  * a message using the plugin.   Note that in the case of a




reply via email to

[Prev in Thread] Current Thread [Next in Thread]