Actually, the 'Recursion Desired' bit is a good thing. That tells the nameserver to do more work for you, and to hide the extra work. Your quickest queries will be done with this bit turned on. And it also limits your exposure to bugs in your own code by making it do less.
I turn it off when I test to burn the hell out of my code. With the recursion desired bit turned off, the first nameserver can do things like send you the name of the nameserver you need to contact, but not provide an IP address for it. Then you have to send another query to get the IP address to contact that nameserver. And then that nameserver will pass you to another nameserver. You get the idea ... A simple packet send and receive can wind up to more than 7 or 8 requests.
also mike, have a question. i know you aren't going to release mTCP source code any time soon, but is there a way to maybe compile it as an OBJ that can be linked in with QB EXEs?
I know how to package the multiple OBJs into a Turbo C++ library. The library can then be used like a giant OBJ file that you can link other code against. I can do that now.
The thing I don't know how to do is how to make it callable/linkable from a non Borland language. I know that within the Borland products you could link different languages together if you followed a few rules. But I don't know if they had interoperability with Microsoft products, and I seriously doubt it. If you do the legwork to tell me if this is possible that will save me some time.
Lastly, there is the possibility of a TSR interface. And I think that's a desirable thing to do, because that essentially makes it callable from anywhere. But the TSR interface has some drawbacks:
- I have to strip the tracing code out. That's a shame, because the tracing code has been a real help in debugging. (Although it's not used for debug too often anymore.)
- I have to change the startup code quite a bit to not allocate memory. Memory allocation would have to be done by the user and passed to the library.
- Performance is going to suffer a bit. The software interrupt mechanism is not exactly high performance compared to a direct call/return.
- There is a lot of additional work to take every C++ entry point and make a TSR entry point/routing function for it.
If you did an application in Turbo C++ I could give you a library in a day - I just need to clean the header files up. You could have the full library with tracing and all of the performance tomorrow.
Do the legwork to see how MS languages interact with Borland Turbo C. I'll do the same. I was thinking of starting an FTP client next because I think there is a lot of need for that, but getting you coding with this library would be a good thing too.
Mike