lcore.org gitweb
/
lcore.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix slow send speed, new fifo allows get of entire buffer
[lcore.git]
/
lcorewsaasyncselect.pas
diff --git
a/lcorewsaasyncselect.pas
b/lcorewsaasyncselect.pas
old mode 100755
(executable)
new mode 100644
(file)
index
622c92e
..
6b4c01b
--- a/
lcorewsaasyncselect.pas
+++ b/
lcorewsaasyncselect.pas
@@
-6,7
+6,10
@@
procedure lcoreinit;
\r
implementation
\r
\r
\r
implementation
\r
\r
-uses wcore,lcore,bsearchtree,sysutils,windows,winsock,pgtypes,messages,classes,lsocket;
\r
+uses
\r
+ dnswin, //to call init
\r
+ wcore,lcore,bsearchtree,sysutils,windows,winsock,pgtypes,messages,classes,lsocket;
\r
+
\r
type
\r
twineventcore=class(teventcore)
\r
public
\r
type
\r
twineventcore=class(teventcore)
\r
public
\r
@@
-144,7
+147,7
@@
begin
if readtrigger or writetrigger then lasio.handlefdtrigger(readtrigger,writetrigger);
\r
end;
\r
// don't reset the event manually for listen sockets to avoid unwanted
\r
if readtrigger or writetrigger then lasio.handlefdtrigger(readtrigger,writetrigger);
\r
end;
\r
// don't reset the event manually for listen sockets to avoid unwanted
\r
- // extra onsessionavail
i
ble events
\r
+ // extra onsessionavail
a
ble events
\r
if (taddrint(findtree(@fdwatches,inttostr(socket))) and (FD_ACCEPT)) = 0 then dowsaasyncselect(socket,0,0); // if not a listen socket reset watches
\r
end;
\r
end else if (ahwnd=hwndlcore) and (aumsg=wm_dotasks) then begin
\r
if (taddrint(findtree(@fdwatches,inttostr(socket))) and (FD_ACCEPT)) = 0 then dowsaasyncselect(socket,0,0); // if not a listen socket reset watches
\r
end;
\r
end else if (ahwnd=hwndlcore) and (aumsg=wm_dotasks) then begin
\r
@@
-163,6
+166,7
@@
end;
procedure winaddtask(ahandler:ttaskevent;aobj:tobject;awparam,alparam:longint);
\r
begin
\r
if not tasksoutstanding then PostMessage(hwndlcore,wm_dotasks,0,0);
\r
procedure winaddtask(ahandler:ttaskevent;aobj:tobject;awparam,alparam:longint);
\r
begin
\r
if not tasksoutstanding then PostMessage(hwndlcore,wm_dotasks,0,0);
\r
+ tasksoutstanding := true;
\r
end;
\r
type
\r
twcoretimer = wcore.tltimer;
\r
end;
\r
type
\r
twcoretimer = wcore.tltimer;
\r
@@
-205,6
+209,8
@@
procedure lcoreinit;
begin
\r
if (inited) then exit;
\r
\r
begin
\r
if (inited) then exit;
\r
\r
+ dnswin.init;
\r
+
\r
eventcore := twineventcore.create;
\r
if Windows.RegisterClass(MyWindowClass) = 0 then halt;
\r
//writeln('about to create lcore handle, hinstance=',hinstance);
\r
eventcore := twineventcore.create;
\r
if Windows.RegisterClass(MyWindowClass) = 0 then halt;
\r
//writeln('about to create lcore handle, hinstance=',hinstance);
\r
@@
-224,8
+230,9
@@
begin
timerwrapperinterface := twintimerwrapperinterface.create(nil);
\r
\r
WSAStartup(2, GInitData);
\r
timerwrapperinterface := twintimerwrapperinterface.create(nil);
\r
\r
WSAStartup(2, GInitData);
\r
- absol
o
utemaxs := maxlongint;
\r
+ absolutemaxs := maxlongint;
\r
\r
\r
+ wcoreinit;
\r
\r
inited := true;
\r
end;
\r
\r
inited := true;
\r
end;
\r