I'm normally a UNIX developer and when doing X based code, integrating message handling and network handling is pretty simple; the message queue from X and the sockets are all effectively file descriptors, and then one can just select over the set of queues and sockets, and when that times out, you can paint the window pretty much when you feel like it. I'm looking at doing some Windows code, and I'm wondering how one is supposed to integrate the network operations into the windows message loop. (I've done windows coding before, just nothing that's used both message handling AND networking..) I can think of several solutions; Let data queue up in the network ports and handle it in the idle message by polling for available data. (Though this is reliant on timely arrival of "idle" messages; which may not be that timely if the system is busy). Handle it similarly in the paint message (that feels naughty somehow). Have a thread doing the network comms, and posting custom messages to the main loop to get it to handle the data when complete network messages arrive. Or can one get windows to have the sockets post messages when there's data available? (is this what IO completions are for? And are they available for connectionless sockets?). I'm really just after getting a handle on what's best practice in this area that's not going to upset the OS or other applications.  I'm still pondering which to use. A solution that works for both would be good. To be honest, I've never had issues with connected links, but then I normally only run code over either local networks, or very carefully managed wans.