X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/e14f985630dc9b0edad92d591fbede30928cda37..ba45339b0cda696438a3b1553c829445fd894641:/lcoretest.dpr?ds=sidebyside diff --git a/lcoretest.dpr b/lcoretest.dpr old mode 100755 new mode 100644 index 61d771f..288c0b4 --- a/lcoretest.dpr +++ b/lcoretest.dpr @@ -3,7 +3,7 @@ program lcoretest; uses lcore, lsocket, - {$ifdef win32} + {$ifdef mswindows} lcorewsaasyncselect in 'lcorewsaasyncselect.pas', {$else} lcoreselect, @@ -14,15 +14,16 @@ uses dnssync //we don't actually make any use of the units below in this app, we just //include it to check if it compiles ok ;) - {$ifndef win32} + {$ifndef mswindows} , {$ifndef nomessages} - lmessages, + lcoremessages, + unitwindowobject, {$endif} unitfork {$endif} ; -{$ifdef win32} +{$ifdef mswindows} {$R *.RES} {$endif} @@ -36,9 +37,9 @@ type procedure dnsrequestdone(sender:tobject;error : word); procedure sessionclosed(sender:tobject;error : word); end; - treleasetest=class(tlcomponent) - destructor destroy; override; - end; + treleasetest=class(tlcomponent) + destructor destroy; override; + end; var listensocket : tlsocket; serversocket : tlsocket; @@ -150,13 +151,13 @@ end; procedure tsc.timehandler(sender:tobject); begin //writeln('got timer event'); -end; - -destructor treleasetest.destroy; -begin - writeln('releasetest.destroy called'); - inherited destroy; -end; +end; + +destructor treleasetest.destroy; +begin + writeln('releasetest.destroy called'); + inherited destroy; +end; procedure tsc.sessionclosed(sender:tobject;error : word); begin @@ -167,12 +168,12 @@ var ipbin : tbinip; dummy : integer; iplist : tbiniplist; - releasetest : treleasetest; + releasetest : treleasetest; begin lcoreinit; - releasetest := treleasetest.create(nil); - releasetest.release; - + releasetest := treleasetest.create(nil); + releasetest.release; + ipbin := forwardlookup('invalid.domain',5); writeln(ipbintostr(ipbin)); @@ -191,6 +192,7 @@ begin listensocket.onsessionavailable := sc.sessionavailable; writeln('listening'); listensocket.listen; + writeln('listen call returned'); writeln(listensocket.getxport); writeln('listen socket is number ', listensocket.fdhandlein); writeln('creating and setting up server socket');