View Single Post
Posts: 146 | Thanked: 15 times | Joined on Oct 2008
#11
Originally Posted by v13 View Post
It depends on your program:

If you have a cpu-intensive program (let's say a password cracker - that runs all the time) that needs to communicate with the network you may need separate processes (but for the cpu-intensive part).

For most other cases you do this using select/poll or an API that is based on that (like asyncore or twisted).

On the other hand, if you're writing a GUI program you'll have to look at the toolkit's libraries for something that properly interacts with its main loop. Qt for example has a networking module that will fit your needs.
My app is not extremely CPU intensive.... I will think about what you've wrote, but looks like the select/poll thing is close to what I need. I would have to do it on sockets, since I want my app to be cross-platform.


Thanks,
L.

Last edited by luis; 2011-03-01 at 02:47.