Thanks Kaptein im trying to keep away from any libraries for ease of licencing and distribution across patforms so im going to try the ConnectEx and non blocking sockets
I found async dns code here which looks good http://adns.sourceforge.net/
but now my question is how do I know if I should lookup ipv6 aaaa records or ipv4 a records?
I wouldnt want to lookup a ipv6 and fallback to ipv4 that could take twice as long so does the operating system know which to use I assume it would so the best way would be to ask the os somehow which one to use?
I currently only do ipv4 but while im in there messing with things might as well try to add ipv6