lcore.org gitweb
/
lcore.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add lserial.pas
[lcore.git]
/
lsocket.pas
diff --git
a/lsocket.pas
b/lsocket.pas
index a7c6164f8864f21a5c2eb3b0e11d273b1ec54599..bcff6436d3fc92511cd33d6934f9c07e6f884345 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
@@
-293,7
+299,7
@@
begin
if not assigned(connecttimeout) then begin
\r
connecttimeout := tltimer.create(self);
\r
connecttimeout.ontimer := connecttimeouthandler;
\r
if not assigned(connecttimeout) then begin
\r
connecttimeout := tltimer.create(self);
\r
connecttimeout.ontimer := connecttimeouthandler;
\r
- connecttimeout.interval :=
25
00;
\r
+ connecttimeout.interval :=
50
00;
\r
connecttimeout.enabled := false;
\r
end;
\r
realconnect;
\r
connecttimeout.enabled := false;
\r
end;
\r
realconnect;
\r