Pushing data to websocket connections is the actual purpose behind mg_wakeup_server_ex. 1. Pass the message to mg_wakeup_server_ex(). 2. In the callback, call mg_websocket_write() to push the message to the connection.
On Fri, Jul 18, 2014 at 12:42 PM, swati joshi <[email protected]> wrote: > Pardon me, > I want the data to be sent via websockets. > So currently i was using mg_websocket_write( ). > So depending on connectionPtr->uri , i would send different responses to > the client. > > As suggested , I looked into proxy.c example. I am not sure how > mg_wakeup_server_ex ( ) would actually help. > I had referred to websockets.c ( > https://github.com/cesanta/mongoose/blob/1389eec784c2efdbf692309fa591f4a61b39e232/examples/websocket.c). > Which is what i am exactly trying to do. > Please let me know in any way how can i use mg_wakeup_server_ex ( ) to do > the same functionality > > Thanks a ton!! > > -- > 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.
