pike.git / lib / modules / Protocols.pmod / DNS.pmod

version» Context lines:

pike.git/lib/modules/Protocols.pmod/DNS.pmod:1: - // $Id: DNS.pmod,v 1.102 2010/01/05 18:47:33 bill Exp $ + // $Id$   // Not yet finished -- Fredrik Hubinette       //inherit Stdio.UDP : udp;   //! RFC 1034, RFC 1035 and RFC 2308    protected void send_reply(mapping r, mapping q, mapping m, Stdio.UDP udp);      #pike __REAL_VERSION__      final constant NOERROR=0;   final constant FORMERR=1;
pike.git/lib/modules/Protocols.pmod/DNS.pmod:1523:    function callback, mixed ... args) {    array a;    if (mx) {    a = column(mx, "mx");    sort(column(mx, "preference"), a);    }    callback(a, @args);    }, callback, @args);    }    +  void close() +  { +  udp::close(); +  udp::set_read_callback(0); +  } +     void create(void|string|array(string) server, void|string|array(string) domain)    {    if(!udp::bind(0))    error( "DNS: failed to bind a port.\n" );   #if 0    werror("Protocols.DNS.async_client(%O, %O)\n"    "UDP Address: %s\n"    "%s\n", server, domain, udp::query_address(),    describe_backtrace(backtrace()));   #endif /* 0 */