From 094535c010320967639e8e86f974d878e80baa72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Fri, 1 May 2015 16:13:57 +0200 Subject: Imported Upstream version 1.7.0 --- spectro/mongoose.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'spectro/mongoose.h') 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. // -- cgit v1.2.3