PageRenderTime 19ms CodeModel.GetById 14ms app.highlight 1ms RepoModel.GetById 2ms app.codeStats 0ms

/contrib/ntp/arlib/README

https://bitbucket.org/freebsd/freebsd-head/
#! | 49 lines | 34 code | 15 blank | 0 comment | 0 complexity | a4c96e4677c13756327a8cebd6a944e8 MD5 | raw file
 1
 2				Asynchronous DNS
 3				----------------
 4
 5	Intro.
 6
 7For those who write real time network applications that have to handle
 8multiple TCP or UDP connections, the problem of effectively doing DNS
 9lookups is quite real.  Generally, this means the program waits while
10the query finishes, holding everything else up.  This small library of
11routines aims to solve that problem by performing the DNS query and
12then returning the program to its normal flow.
13
14	Whats included ?
15
16The library routines, arlib.c, a header file for it, arlib.h, a man
17page, arlib.3 and an example of how this sort of code is used,
18sample.c.
19
20
21	Compilation & Installation.
22
23Edit the Makefile and do "make install" to install things where you
24wish them to go.  You should check it makes and works before doing
25this :)
26
27If the compilation is successful, you'll have an executeable called
28"example" and libares.a.  "example" is a simple program which will
29do hostname->IP# or IP#->hostnae lookups by entering either the
30hostname or IP# on the line with "Host-->".  You dont have to wait
31for a query to fail or succeed before typing in the next line.
32
33	Portability.
34
35I'm not sure how portable this is, it was written under SunOS 4.1.2
36on a Sparc 1+ and hasn't been tested very widely.  If you find any
37problems when compiling/execution, plase send me a patch (using
38diff -c) to avalon@coombs.anu.edu.au.  If it goes well enough, I'll
39send it to comp.unix.sources or comp.sources.misc for further testing.
40
41	Future additions.
42
43Adding a working cache would be nice but I'm not sure if that really
44is needed (?).  I guess it depends on how often your program is
45required to do a DNS lookup and whether caching would help.
46
47
48Cheers,
49Darren.