-tlsa rr added to namestore
[oweals/gnunet.git] / src / include / gnunet_stream_lib.h
index c8a207d59b63f9c5c61d9546ec0dfe48047ce0c6..a134470c75b7ccca763fcdb0133e065f79afdd7c 100644 (file)
@@ -85,6 +85,13 @@ typedef void (*GNUNET_STREAM_OpenCallback) (void *cls,
                                            struct GNUNET_STREAM_Socket *socket);
 
 
+/**
+ * Callback for signalling stream listen success; See
+ * GNUNET_STREAM_OPTION_SIGNAL_LISTEN_SUCCESS
+ */
+typedef void (*GNUNET_STREAM_ListenSuccessCallback) (void);
+
+
 /**
  * Options for the stream.
  */
@@ -112,9 +119,17 @@ enum GNUNET_STREAM_Option
     GNUNET_STREAM_OPTION_TESTING_SET_WRITE_SEQUENCE_NUMBER,
 
     /**
-     * Listen socket timeout in milliseconds
+     * Listen socket timeout in milliseconds given as uint32_t
+     */
+    GNUNET_STREAM_OPTION_LISTEN_TIMEOUT,
+
+    /**
+     * Option to register a callback when stream listening is
+     * successfull. Takes parameter of the form
+     * GNUNET_STREAM_ListenSuccessCallback. The callback is only called if
+     * listen is successful
      */
-    GNUNET_STREAM_OPTION_LISTEN_TIMEOUT
+    GNUNET_STREAM_OPTION_SIGNAL_LISTEN_SUCCESS
   };
 
 
@@ -125,7 +140,8 @@ enum GNUNET_STREAM_Option
  * @param target the target peer to which the stream has to be opened
  * @param app_port the application port number which uniquely identifies this
  *            stream
- * @param open_cb this function will be called after stream has be established 
+ * @param open_cb this function will be called after stream has be established;
+ *          cannot be NULL
  * @param open_cb_cls the closure for open_cb
  * @param ... options to the stream, terminated by GNUNET_STREAM_OPTION_END
  * @return if successful it returns the stream socket; NULL if stream cannot be