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.
*/
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
};
* @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