Generate Dynamic Listening port

51 views
Skip to first unread message

Wunna Lwin

unread,
Dec 22, 2015, 9:10:50 PM12/22/15
to mongoose-users
Hi, 
I am very new on mongoose and their is something I don't understanding in new mongoose version 6.1.
Previous version on 5.4 we use   mg_set_option(server, "listening_port", "0");  and mg_get_option(server, "listening_port"); to get a dynamic listening port. But right now I just only see mg_bind(struct mg_mgr *, const char *,  mg_event_handler_t);  method and some of examples use static listening port. How can i generate dynamic listening port using mg_bind function.

My next question is okay I use mg_bind function and then write infinite for loop for mg_mgr_poll(&mgr,1000);. That function aways return MG_EV_POLL and never return MG_EV_RECV or something. Could you please explain me about these two question.

Thanks.
Wunna

Sergey Lyubka

unread,
Dec 23, 2015, 9:46:48 AM12/23/15
to mongoose-users
Hi Wunna,
We're discontinuing this mailing list, please use forum.cesanta.com for questions.

Thanks!


--
You received this message because you are subscribed to the Google Groups "mongoose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongoose-user...@googlegroups.com.
To post to this group, send email to mongoos...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongoose-users.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages