X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/ee62c0d008ff4a83ab86597030637636c2fa5d13..3124451e3e3e632e45928b7d28e3b2bff06e1879:/lsocket.pas?ds=inline diff --git a/lsocket.pas b/lsocket.pas index a7c6164..7f9617e 100755 --- a/lsocket.pas +++ b/lsocket.pas @@ -101,6 +101,9 @@ type proto:ansistring; udp,dgram:boolean; listenqueue:integer; + + onconnecttryip:procedure(sender:tobject; const ip:tbinip) of object; + {$ifdef secondlistener} secondlistener:tlsocket; lastsessionfromsecond:boolean; @@ -193,9 +196,12 @@ end; procedure tlsocket.realconnect; var a,b:integer; + iptemp:tbinip; begin + iptemp := biniplist_get(biniplist,currentip); //writeln('trying to connect to ',ipbintostr(biniplist_get(biniplist,currentip)),'#',port); - makeinaddrv(biniplist_get(biniplist,currentip),port,inaddr); + if assigned(onconnecttryip) then onconnecttryip(self,iptemp); + makeinaddrv(iptemp,port,inaddr); inc(currentip); if (currentip >= biniplist_getcount(biniplist)) then trymoreips := false;