aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2012-10-19 15:20:54 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2012-10-19 15:20:54 +0000
commit4fda586905ec379f8be429720042c0fa2ad7ab36 (patch)
treede7568a7abe989aee362c32b44860c340c98f92b /src
parent2196beb936a96e5341522655ad885a41a09c3558 (diff)
downloadgnunet-4fda586905ec379f8be429720042c0fa2ad7ab36.tar.gz
gnunet-4fda586905ec379f8be429720042c0fa2ad7ab36.zip
- figure out http_client overhead
Diffstat (limited to 'src')
-rw-r--r--src/transport/plugin_transport_http_client.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/transport/plugin_transport_http_client.c b/src/transport/plugin_transport_http_client.c
index a710cd3c2..3dce0775d 100644
--- a/src/transport/plugin_transport_http_client.c
+++ b/src/transport/plugin_transport_http_client.c
@@ -186,6 +186,12 @@ struct Session
186 void *client_get; 186 void *client_get;
187 187
188 /** 188 /**
189 * Outbound overhead due to HTTP connection
190 * Add to next message of this session when calling callback
191 */
192 size_t overhead;
193
194 /**
189 * next pointer for double linked list 195 * next pointer for double linked list
190 */ 196 */
191 struct HTTP_Message *msg_head; 197 struct HTTP_Message *msg_head;
@@ -358,7 +364,14 @@ client_exist_session (struct HTTP_Client_Plugin *plugin, struct Session *s)
358 return GNUNET_NO; 364 return GNUNET_NO;
359} 365}
360 366
361#if VERBOSE_CURL 367static void
368client_remark_outbound_overhead (void *cls, size_t size)
369{
370 //FIXME use this overhead
371 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "transport-http_client",
372 "Overhead: %u\n", size);
373}
374
362/** 375/**
363 * Function to log curl debug messages with GNUNET_log 376 * Function to log curl debug messages with GNUNET_log
364 * 377 *
@@ -386,12 +399,13 @@ client_log (CURL * curl, curl_infotype type, char *data, size_t size, void *cls)
386 break; 399 break;
387 case CURLINFO_HEADER_OUT: 400 case CURLINFO_HEADER_OUT:
388 ttype = "HEADER_OUT"; 401 ttype = "HEADER_OUT";
402 client_remark_outbound_overhead (cls, size);
389 break; 403 break;
390 default: 404 default:
391 ttype = "UNSPECIFIED"; 405 ttype = "UNSPECIFIED";
392 break; 406 break;
393 } 407 }
394 408#if VERBOSE_CURL
395 memcpy (text, data, size); 409 memcpy (text, data, size);
396 if (text[size - 1] == '\n') 410 if (text[size - 1] == '\n')
397 text[size] = '\0'; 411 text[size] = '\0';
@@ -408,9 +422,10 @@ client_log (CURL * curl, curl_infotype type, char *data, size_t size, void *cls)
408 "Connection %p %s: %s", cls, ttype, text); 422 "Connection %p %s: %s", cls, ttype, text);
409#endif 423#endif
410 } 424 }
425#endif
411 return 0; 426 return 0;
412} 427}
413#endif 428
414 429
415 430
416/** 431/**