-
Advice on multithreading
Hi,
I am currently doing research for a 40 hour project which will begin in january for school. I am planning on writing a P2P network chat application, but given the time constraints, it will have to be quite simple. I wanted some advice on how I would go about ensuring that the program can simultaneously send and receive messages. I think I need multithreading, but on the other hand from what I remember about forking, that might be all I need. Could anyone offer any advice on this? The program will almost certainly have to run in windows, you know what schools are like, and it will have to have a gui, so I guess portability is out the windows with that one :P
Thanks,
Calef13
-
Actually after a little research I realise that forking is really not done on windows, I'm better off with multithreading.
Calef13
-
Or you might consider looking up the select() function, in particular the timeout feature.
-
Does Windows use select() for async I/O? Well, I suppose it supports it, but completion ports might be a better choice, as they integrate better into the message system.
Or you could just use Boost.Asio and hide all that stuff.