📄 readme
字号:
Asynchronous DNS ---------------- Intro.For those who write real time network applications that have to handlemultiple TCP or UDP connections, the problem of effectively doing DNSlookups is quite real. Generally, this means the program waits whilethe query finishes, holding everything else up. This small library ofroutines aims to solve that problem by performing the DNS query andthen returning the program to its normal flow. Whats included ?The library routines, arlib.c, a header file for it, arlib.h, a manpage, arlib.3 and an example of how this sort of code is used,sample.c. Compilation & Installation.Edit the Makefile and do "make install" to install things where youwish them to go. You should check it makes and works before doingthis :)If the compilation is successful, you'll have an executeable called"example" and libares.a. "example" is a simple program which willdo hostname->IP# or IP#->hostnae lookups by entering either thehostname or IP# on the line with "Host-->". You dont have to waitfor a query to fail or succeed before typing in the next line. Portability.I'm not sure how portable this is, it was written under SunOS 4.1.2on a Sparc 1+ and hasn't been tested very widely. If you find anyproblems when compiling/execution, plase send me a patch (usingdiff -c) to avalon@coombs.anu.edu.au. If it goes well enough, I'llsend it to comp.unix.sources or comp.sources.misc for further testing. Future additions.Adding a working cache would be nice but I'm not sure if that reallyis needed (?). I guess it depends on how often your program isrequired to do a DNS lookup and whether caching would help.Cheers,Darren.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -