X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/4782a5c5afee47721cc617daa40dd29828342c2b..69b439a013e03cd1d3eb13da8bbbc20aa5bf5184:/lcoretest.dpr diff --git a/lcoretest.dpr b/lcoretest.dpr index f6fe72b..b58e14a 100755 --- a/lcoretest.dpr +++ b/lcoretest.dpr @@ -11,7 +11,10 @@ uses dnsasync, binipstuff, sysutils, - dnssync; + dnssync, + //we don't actually make any use of lmessages in this app, we just + //include it to check if it compiles ok ;) + lmessages; {$ifdef win32} {$R *.RES} {$endif} @@ -65,7 +68,7 @@ begin receivecount := receivecount +1; if receivecount >50 then begin writeln('received over 50 bits of data, pausing to let the operator take a look'); - readln; + receivecount := 0; end; while pos(#10,receivebuf) > 0 do begin @@ -82,6 +85,7 @@ end; procedure tsc.sessionconnected(sender: tobject;error : word); begin + if error=0 then begin writeln('session is connected, local address is'+clientsocket.getxaddr); @@ -112,15 +116,22 @@ begin das.onrequestdone := sc.dnsrequestdone; //das.forwardfamily := af_inet6; das.forwardlookup('irc.ipv6.p10link.net'); + end; procedure tsc.dnsrequestdone(sender:tobject;error : word); +var + tempbinip : tbinip; + tempbiniplist : tbiniplist; begin writeln('irc.ipv6.p10link.net resolved to '+das.dnsresult+' connecting client socket there'); - clientsocket.addr := das.dnsresult; + das.dnsresultbin(tempbinip); + tempbiniplist := biniplist_new; + biniplist_add(tempbiniplist,tempbinip); + clientsocket.addr := tempbiniplist; clientsocket.port := '6667'; clientsocket.connect; - writeln(clientsocket.getxaddr); + //writeln(clientsocket.getxaddr); das.free; end;