summaryrefslogtreecommitdiff
path: root/spectro/mongoose.h
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2015-05-01 16:24:15 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2015-05-01 16:24:15 +0200
commita30ba67504ffd12c4db499adbb5ce47a7d1f6036 (patch)
tree9ae1a7e3849dda6bbb5c578232f6f2fa5b2e7e7e /spectro/mongoose.h
parent89e99e8a827859729729dfc92d74be4a8f96f1a4 (diff)
parent094535c010320967639e8e86f974d878e80baa72 (diff)
New release 1.7.0
Diffstat (limited to 'spectro/mongoose.h')
-rw-r--r--spectro/mongoose.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/spectro/mongoose.h b/spectro/mongoose.h
index 708cf73..1ee0c47 100644
--- a/spectro/mongoose.h
+++ b/spectro/mongoose.h
@@ -107,11 +107,23 @@ typedef void *(*mg_callback_t)(enum mg_event event, struct mg_connection *conn);
// Please refer to http://code.google.com/p/mongoose/wiki/MongooseManual
// for the list of valid option and their possible values.
//
+// If one of the listening ports is "0", then it will be automatically
+// allocated to a free port by the system, and the port that gets allocated
+// may be retrieved by calling mg_get_listening_port() bellow.
+//
// Return:
// web server context, or NULL on error.
struct mg_context *mg_start(mg_callback_t callback, void *user_data,
const char **options);
+// Get the allocated port number of the first port 0 listener,
+// or the last non-0 port listener.
+// Return 0 on error
+int mg_get_listening_port(struct mg_context *ctx);
+
+// Get a URL for accessing the server. */
+// Return NULL on error. Free after use.
+char *mg_get_url(struct mg_context *ctx);
// Stop the web server.
//