Embedded Systems Wi-Fi
I've had this problem occasionally.  As you say, the "ready to go" WiFi modules are expensive and usually very limited in what they let you do.  Most try to do too much, like give you a UART interface to a single TCP stream.  That's fine if that's all you want, but I usually have multiple TCP servers or clients, or need more out of band control than what a dumb stream gives me.

What you want is a WiFi module that interfaces at the raw network packet transport layer instead of higher level protocols.  This is sortof like the MAC layer for wired ethernet.  Now you can run your own network stack and do whatever you want above that.

We have done exactly this with the Microchip ZeroG WiFi modules.  We implemented a ZeroG packet layer driver in our PIC 18 network stack.  The rest of the stack doesn't know how packet I/O is performed, so you can set up all the TCP, UDP and other connections as you want.

The source code for our network stack is included in the free PIC Development Tools release at http://www.embedinc.com/pic/dload.htm.  Of course the stack exists within the context of our firmware framework, but using all that is a good idea anyway.  All the stuff I've mentioned here is available for free.