2010/3/5 <[email protected]>: > > Hey, Koen > >> 2010/3/4 <[email protected]>: >> > >> > Hi, >> > >> > If I use boost socket, does it can work for me, if I generate my own >> > socket's thread? In this thread, use select to listen changes about >> > read, write and exception, and emit signals to the slot of >> > WApplication? > >> For sure. The only thing you need to take care of is make sure you >> grab the application's update lock before touching the application or >> any of its widgets. > > I know in the WApplication's session, I can use WApplication::instance() > to get the instance, But It's just one instance of one session, if I want > to push data to browser, I must to get all keep-alive instances, so I > think maybe the Wt framework store all instances that status is keep-alive, > maybe It use a queue or something else. So if I can direct access this > structure or some function to get the structure, I can poll data to all > keep-alive instance which can be grabed itself update lock, then call the > instance's functions to modify widgets. So, do I can get this structure? > How? >
Dear Jiongliang, You'll have to manage yourself a list of WApplications/... that need to be updated on a server push, for example by using a global variable that contains a list of applications. Applications can put themselves in the list in the application constructor, and remove them from the list in the destructor (but the appropriate way to do this really depends on you application). Best regards, Wim. ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ witty-interest mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/witty-interest
