lcore.org gitweb
/
lcore.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added lsocket.onconnecttryip handler for apps that want to use this information
[lcore.git]
/
lsocket.pas
diff --git
a/lsocket.pas
b/lsocket.pas
index a7c6164f8864f21a5c2eb3b0e11d273b1ec54599..7f9617e55210fe5ff774c0e4ec0935ae228adae8 100755
(executable)
--- a/
lsocket.pas
+++ b/
lsocket.pas
@@
-101,6
+101,9
@@
type
proto:ansistring;
\r
udp,dgram:boolean;
\r
listenqueue:integer;
\r
proto:ansistring;
\r
udp,dgram:boolean;
\r
listenqueue:integer;
\r
+
\r
+ onconnecttryip:procedure(sender:tobject; const ip:tbinip) of object;
\r
+
\r
{$ifdef secondlistener}
\r
secondlistener:tlsocket;
\r
lastsessionfromsecond:boolean;
\r
{$ifdef secondlistener}
\r
secondlistener:tlsocket;
\r
lastsessionfromsecond:boolean;
\r
@@
-193,9
+196,12
@@
end;
procedure tlsocket.realconnect;
\r
var
\r
a,b:integer;
\r
procedure tlsocket.realconnect;
\r
var
\r
a,b:integer;
\r
+ iptemp:tbinip;
\r
begin
\r
begin
\r
+ iptemp := biniplist_get(biniplist,currentip);
\r
//writeln('trying to connect to ',ipbintostr(biniplist_get(biniplist,currentip)),'#',port);
\r
//writeln('trying to connect to ',ipbintostr(biniplist_get(biniplist,currentip)),'#',port);
\r
- makeinaddrv(biniplist_get(biniplist,currentip),port,inaddr);
\r
+ if assigned(onconnecttryip) then onconnecttryip(self,iptemp);
\r
+ makeinaddrv(iptemp,port,inaddr);
\r
inc(currentip);
\r
if (currentip >= biniplist_getcount(biniplist)) then trymoreips := false;
\r
\r
inc(currentip);
\r
if (currentip >= biniplist_getcount(biniplist)) then trymoreips := false;
\r
\r