X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/4782a5c5afee47721cc617daa40dd29828342c2b..be01aa2e4e4e54fd8bb3ea27ac3c6b7978553b6e:/lcoretest.dpr diff --git a/lcoretest.dpr b/lcoretest.dpr index f6fe72b..3770b19 100755 --- a/lcoretest.dpr +++ b/lcoretest.dpr @@ -65,7 +65,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 +82,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 +113,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;