PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

multithreading/networking for a noob

I've been working on a game with GAPIDraw, thus far to good success, but now I'd like to add in some networking (both IR and wifi).

I'm assuming that creating a socket listener in a separate thread would be the best way to go about this, but I've never really done multithreading before, let alone on a Pocket PC. I've noticed that GAPIDraw has GapiApplicationMT.cpp/.h for multithreading, but I was wondering if anyone could point me towards some examples of it being used?

Alternatively - would I even need to create a new thread, or could I do something with the windows event handler to communicate messages from "the outside world" to my game? Like I said, I'm a newbie here, & haven't worked much with networking code before.

Any advice I could get, or pointers to resources (especially code samples), would help me tremendously.
Sargon,

Don't use GapiApplicationMT, it is only provided for some users who want their stationary PC applications running-while-resizing the window. You will most likely get in trouble if you use that without knowing how to handle threads.

Otherwise I really recommend codeguru.com or another programming site for tips on multithreaded programming.
Thank you Johan, I'll avoid the MT business & look around at the site you mentioned. Of course, if anyone has other sites to recommend, I'm all ears!