stuff
authorChristian Grothoff <christian@grothoff.org>
Fri, 3 Jun 2011 22:15:09 +0000 (22:15 +0000)
committerChristian Grothoff <christian@grothoff.org>
Fri, 3 Jun 2011 22:15:09 +0000 (22:15 +0000)
src/include/gnunet_transport_service.h
src/transport/transport.h
src/transport/transport_api.c

index 8d1eb2921548aae3b05da64b4c381d23c37e712e..98ef8c229c4d59ca4c39498f003a498cdbcd6675 100644 (file)
@@ -490,6 +490,18 @@ struct GNUNET_TRANSPORT_Handle *GNUNET_TRANSPORT_connect (const struct
 void GNUNET_TRANSPORT_disconnect (struct GNUNET_TRANSPORT_Handle *handle);
 
 
+/**
+ * Ask the transport service to establish a connection to 
+ * the given peer.
+ *
+ * @param handle connection to transport service
+ * @param target who we should try to connect to
+ */
+void
+GNUNET_TRANSPORT_try_connect (struct GNUNET_TRANSPORT_Handle *handle,
+                             const struct GNUNET_PeerIdentity *target);
+
+
 /**
  * Set the share of incoming/outgoing bandwidth for the given
  * peer to the specified amount.
@@ -503,9 +515,7 @@ void
 GNUNET_TRANSPORT_set_quota (struct GNUNET_TRANSPORT_Handle *handle,
                             const struct GNUNET_PeerIdentity *target,
                             struct GNUNET_BANDWIDTH_Value32NBO quota_in,
-                            struct GNUNET_BANDWIDTH_Value32NBO quota_out,
-                            struct GNUNET_TIME_Relative timeout,
-                            GNUNET_SCHEDULER_Task cont, void *cont_cls);
+                            struct GNUNET_BANDWIDTH_Value32NBO quota_out);
 
 
 /**
index 343679b2ee71ab894724b5049135b27a88d71a9b..237908581afecf85ce8a963ddc5b184a8ac20955 100644 (file)
@@ -181,6 +181,30 @@ struct QuotaSetMessage
 };
 
 
+/**
+ * Message used to ask the transport service to create a connection.
+ */
+struct TryConnectMessage
+{
+
+  /**
+   * Type will be GNUNET_MESSAGE_TYPE_TRANSPORT_TRY_CONNECT
+   */
+  struct GNUNET_MessageHeader header;
+
+  /**
+   * for alignment
+   */
+  uint32_t reserved;
+
+  /**
+   * About which peer are we talking here?
+   */
+  struct GNUNET_PeerIdentity peer;
+
+};
+
+
 /**
  * Message used to notify the transport API about a message
  * received from the network.  The actual message follows.
index ef846c147164f2270671a4b0bdaa2eb72411d599..d2e90d72688f0fb99dad57ecd2e89aa0a6391974 100644 (file)
@@ -972,7 +972,8 @@ GNUNET_TRANSPORT_set_quota (struct GNUNET_TRANSPORT_Handle *handle,
   sqc->quota_in = quota_in;
   schedule_control_transmit (handle,
                              sizeof (struct QuotaSetMessage),
-                             GNUNET_NO, timeout, &send_set_quota, sqc);
+                             GNUNET_NO, 
+                            GNUNET_TIME_UNIT_FOREVER_REL, &send_set_quota, sqc);
 }