That uses an old, synchronous mongoose. Can you try it with the current, async version?
On Wed, Jul 30, 2014 at 1:35 PM, Neriah BJ Ato <[email protected]> wrote: > main() function: > > struct mg_context *context; > const char * options[] = {"listening_ports", opt.receiving_http_port, > NULL}; > > //Start HTTP receiving loop > context = mg_start(&callback, NULL, options); > > //Infinite loop > while (1); > > mg_stop(context); > > Where opt.receiving_http_port is the port to be bound. I think I'm using a > version dated 2011. > > On Wednesday, July 30, 2014 8:02:39 PM UTC+8, Sergey Lyubka wrote: > >> Please show your mongoose initialization code >> >> >> On Wed, Jul 30, 2014 at 12:57 PM, Neriah BJ Ato <[email protected]> >> wrote: >> >>> I'm developing a C-based HTTP forwarding application for OpenWrt in a >>> Carambola device using the Mongoose.h library, and I'm trying to send HTTP >>> packets to that application using curl or telnet. But my problem is it >>> couldn't connect to host, even though I curl or telnet the program from >>> either localhost or from another device in the network. I've tried turning >>> off the firewall for the Carambola device, but it still cannot connect to >>> the host. I've also tried changing the port, starting from 5000 and up, but >>> the result is still the same. >>> >>> I've tried running the program in a different environment (Ubuntu 14.04 >>> in my PC), and I can access the program using the same port using telnet, >>> curl, or any other TCP script, from either localhost or another device >>> within the network. I've also tried running a Lua-based TCP server program >>> that binds in the same port as the running HTTP forwarder program. It >>> doesn't induce any errors to both programs but only the Lua program >>> receives data. >>> >>> I've also tried netstat while the program is running, but the port >>> doesn't appear to be used by anything. Thus my question in the topic: does >>> the API bind at the port at start up? Or is this a Carambola/OpenWrt >>> related problem? >>> >>> -- >>> 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 [email protected]. >>> To post to this group, send email to [email protected]. >>> >>> Visit this group at http://groups.google.com/group/mongoose-users. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- > 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 [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/mongoose-users. > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/mongoose-users. For more options, visit https://groups.google.com/d/optout.
