X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/85ef2ce64f0cc31a063fccea69fdcc7281d51548..21410d99e1361e5474a47bb0bd0bc6e939f91b7d:/lcorewsaasyncselect.pas diff --git a/lcorewsaasyncselect.pas b/lcorewsaasyncselect.pas old mode 100755 new mode 100644 index 622c92e..d029103 --- a/lcorewsaasyncselect.pas +++ b/lcorewsaasyncselect.pas @@ -6,7 +6,10 @@ procedure lcoreinit; implementation -uses wcore,lcore,bsearchtree,sysutils,windows,winsock,pgtypes,messages,classes,lsocket; +uses + dnswin, //to call init + wcore,lcore,bsearchtree,sysutils,windows,winsock,pgtypes,messages,classes,lsocket; + type twineventcore=class(teventcore) public @@ -144,7 +147,7 @@ begin if readtrigger or writetrigger then lasio.handlefdtrigger(readtrigger,writetrigger); end; // don't reset the event manually for listen sockets to avoid unwanted - // extra onsessionavailible events + // extra onsessionavailable events if (taddrint(findtree(@fdwatches,inttostr(socket))) and (FD_ACCEPT)) = 0 then dowsaasyncselect(socket,0,0); // if not a listen socket reset watches end; end else if (ahwnd=hwndlcore) and (aumsg=wm_dotasks) then begin @@ -205,6 +208,8 @@ procedure lcoreinit; begin if (inited) then exit; + dnswin.init; + eventcore := twineventcore.create; if Windows.RegisterClass(MyWindowClass) = 0 then halt; //writeln('about to create lcore handle, hinstance=',hinstance); @@ -224,8 +229,9 @@ begin timerwrapperinterface := twintimerwrapperinterface.create(nil); WSAStartup(2, GInitData); - absoloutemaxs := maxlongint; + absolutemaxs := maxlongint; + wcoreinit; inited := true; end;