}
+static int
+client_configure_plugin (struct HTTP_Client_Plugin *plugin)
+{
+ unsigned long long max_connections;
+
+ /* Optional parameters */
+ if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_number (plugin->env->cfg,
+ plugin->name,
+ "MAX_CONNECTIONS", &max_connections))
+ max_connections = 128;
+ plugin->max_connections = max_connections;
+
+ GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
+ _("Maximum number of connections is %u\n"),
+ plugin->max_connections);
+ return GNUNET_OK;
+}
+
/**
* Entry point for the plugin.
*/
plugin->protocol = "http";
#endif
+ if (GNUNET_SYSERR == client_configure_plugin (plugin))
+ {
+ LIBGNUNET_PLUGIN_TRANSPORT_DONE (api);
+ return NULL;
+ }
+
/* Start client */
if (GNUNET_SYSERR == client_start (plugin))
{
SERVICEHOME = /tmp/test-transport/api-http-p1/
DEFAULTCONFIG = test_transport_api_http_peer1.conf
-[transport-http]
-PORT = 12080
+[transport-http_client]
[arm]
PORT = 12085
[transport]
#DEBUG = YES
PORT = 12081
-PLUGINS = http
+PLUGINS = http_client
#BINARY = .libs/gnunet-service-transport
UNIXPATH = /tmp/gnunet-p1-service-transport.sock
#PREFIX = valgrind --leak-check=full
SERVICEHOME = /tmp/test-transport/api-http-p2/
DEFAULTCONFIG = test_transport_api_http_peer2.conf
-[transport-http]
+[transport-http_server]
PORT = 12090
[arm]
[transport]
#DEBUG = YES
PORT = 12091
-PLUGINS = http
+PLUGINS = http_server
UNIXPATH = /tmp/gnunet-p2-service-transport.sock
#PREFIX = valgrind --leak-check=full