dnswin,\r
{$endif}\r
lsocket,lcore,\r
dnswin,\r
{$endif}\r
lsocket,lcore,\r
\r
dnsserverids : array[0..numsock-1] of integer;\r
startts:double;\r
\r
dnsserverids : array[0..numsock-1] of integer;\r
startts:double;\r
dwas : tdnswinasync;\r
{$endif}\r
\r
dwas : tdnswinasync;\r
{$endif}\r
\r
procedure asyncprocess(socketno:integer);\r
procedure receivehandler(sender:tobject;error:word);\r
function sendquery(socketno:integer;const packet:tdnspacket;len:integer):boolean;\r
procedure asyncprocess(socketno:integer);\r
procedure receivehandler(sender:tobject;error:word);\r
function sendquery(socketno:integer;const packet:tdnspacket;len:integer):boolean;\r
procedure winrequestdone(sender:tobject;error:word);\r
{$endif}\r
\r
procedure winrequestdone(sender:tobject;error:word);\r
{$endif}\r
\r
if assigned(dwas) then begin\r
dwas.release;\r
dwas := nil;\r
if assigned(dwas) then begin\r
dwas.release;\r
dwas := nil;\r
requestaf := overrideaf;\r
end;\r
\r
requestaf := overrideaf;\r
end;\r
\r
if usewindns and (addr = '') then begin\r
dwas := tdnswinasync.create;\r
dwas.onrequestdone := winrequestdone;\r
if usewindns and (addr = '') then begin\r
dwas := tdnswinasync.create;\r
dwas.onrequestdone := winrequestdone;\r
\r
procedure tdnsasync.reverselookup;\r
begin\r
\r
procedure tdnsasync.reverselookup;\r
begin\r
if usewindns and (addr = '') then begin\r
dwas := tdnswinasync.create;\r
dwas.onrequestdone := winrequestdone;\r
if usewindns and (addr = '') then begin\r
dwas := tdnswinasync.create;\r
dwas.onrequestdone := winrequestdone;\r
var\r
socketno : integer;\r
begin\r
var\r
socketno : integer;\r
begin\r
if assigned(dwas) then begin\r
dwas.release;\r
dwas := nil;\r
if assigned(dwas) then begin\r
dwas.release;\r
dwas := nil;\r
onrequestdone(self,0);\r
end;\r
\r
onrequestdone(self,0);\r
end;\r
\r
procedure tdnsasync.winrequestdone(sender:tobject;error:word);\r
\r
begin\r
procedure tdnsasync.winrequestdone(sender:tobject;error:word);\r
\r
begin\r
also it means a portable app would gave to deal with inconsistent behavior.\r
enable this option to simulate the behavior of listening on both v4 and v6}\r
\r
also it means a portable app would gave to deal with inconsistent behavior.\r
enable this option to simulate the behavior of listening on both v4 and v6}\r
\r
-{$ifdef win32}{$ifdef ipv6}\r
+{$ifdef mswindows}{$ifdef ipv6}\r
{$define secondlistener}\r
{$endif}{$endif}\r
\r
{$define secondlistener}\r
{$endif}{$endif}\r
\r
-{-------------------------------------------------------------------------------------}
\ No newline at end of file
+{-------------------------------------------------------------------------------------}\r
+{the threaded windows async dns is currently (2014-03-28) broken. it causes crashes\r
+after running for a period of time. -anders}\r
+{$ifdef mswindows}\r
+ {-$define winasyncdns}\r
+{$endif}\r