summaryrefslogtreecommitdiff
path: root/spectro/mongoose.h
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2015-05-01 16:13:57 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2015-05-01 16:13:57 +0200
commit094535c010320967639e8e86f974d878e80baa72 (patch)
treeefc3094b20355dcbeebb2c4ece4fcfc69bffedb5 /spectro/mongoose.h
parentc07d0c2d2f6f7b0eb6e92cc6204bf05037957e82 (diff)
Imported Upstream version 1.7.0upstream/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.
//