How to capture a timeout of 15min inactivity?

Skip to first unread message

Sep 21, 2015, 10:05:35 AM9/21/15
to mongoose-users

Dear list,

I want to "do something" in my main code after 15 min of inactivity. Therefore I was looking into  mg_poll_server() for signal(). The return value of mg_poll_server() is a time!! instead of 0=capture -1=error. My question is how would you realise the 15min timeout (without changing too much in mongoose.c).

I was looking for a solution like this:
int ret=0;

for (;;)
= mg_poll_server(server, 15*60*1000);   //15min timeout

if(ret == 0)
//do sth here

}//end for

Sergey Lyubka

Sep 27, 2015, 10:57:52 AM9/27/15
to mongoose-users
With new Mongoose 6.0, you can iterate over all connections and get the latest IO timestamp.

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
To post to this group, send email to
Visit this group at
For more options, visit

Reply all
Reply to author
0 new messages