Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » Socket review and reimplementation
Re: Socket review and reimplementation [message #9252 is a reply to message #9250] Mon, 23 April 2007 23:44 Go to previous messageGo to previous message
fallingdutch is currently offline  fallingdutch
Messages: 258
Registered: July 2006
Experienced Member
Well i can't follow your idea, i guess i think to much in the way i wanted to implement it. Please give me some more informations about your pluggable main Loop.


I though of a static method with a timeout eg "void device::process(int timeout)" which just checks for incomming "events" and if some events occured calls the callback then quits or if none event occured quits after a timeout.

And aother static method for adding devices to the list of processed devices.

device::process will only handle the devices, not the Windows messages or X11 Events, it will be added to the upp main loop by using PostCallback.

It is possible to process all (correct me if i am wrong) "device" events (including files) using poll!

so a typical non-Gui app would have three steps:
1. initialize all devices
2. add devices to the process list
3. call device::process in a loop (then your callbacks set in step 1 will be called)

and a typical Gui ap would be nearly the same, just call another static method eg device::EnableProcessing which would add device::process to the MainLoop of Upp

Bas
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: U++ & MacOS X Carbon
Next Topic: Windows XP64
Goto Forum:
  


Current Time: Thu Jun 06 14:51:56 CEST 2024

Total time taken to generate the page: 0.02255 seconds