X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/2940bfc96468965b57663b231695179dbbd3baca..44dc132f5dc6ced75e4225826b4eb0dda63392ab:/lcore.pas?ds=sidebyside diff --git a/lcore.pas b/lcore.pas index 4be20f4..0f6eaef 100755 --- a/lcore.pas +++ b/lcore.pas @@ -26,11 +26,11 @@ interface {$ifdef VER1_0} linux, {$else} - baseunix,unix,unixutil, + baseunix,unix,unixutil,sockets, {$endif} fd_utils, {$endif} - classes,pgtypes,bfifo; + classes,pgtypes,bfifo,ltimevalstuff; procedure processtasks; @@ -73,8 +73,8 @@ interface TSendData = procedure (Sender: TObject; BytesSent: Integer) of object; tlcomponent = class(tcomponent) - private - procedure releasetaskhandler(wparam,lparam:longint); + private + procedure releasetaskhandler(wparam,lparam:longint); public procedure release; virtual; destructor destroy; override; @@ -106,7 +106,7 @@ interface lasterror:integer; destroying:boolean; recvbufsize:integer; - function receivestr:string; virtual; + function receivestr:tbufferstring; virtual; procedure close; procedure abort; procedure internalclose(error:word); virtual; @@ -119,8 +119,8 @@ interface procedure dup(invalue:longint); function sendflush : integer; - procedure sendstr(const str : string);virtual; - procedure putstringinsendbuffer(const newstring : string); + procedure sendstr(const str : tbufferstring);virtual; + procedure putstringinsendbuffer(const newstring : tbufferstring); function send(data:pointer;len:integer):integer;virtual; procedure putdatainsendbuffer(data:pointer;len:integer); virtual; procedure deletebuffereddata; @@ -154,12 +154,6 @@ interface var timerwrapperinterface : ttimerwrapperinterface; type - {$ifdef win32} - ttimeval = record - tv_sec : longint; - tv_usec : longint; - end; - {$endif} tltimer=class(tlcomponent) protected @@ -260,7 +254,6 @@ implementation {$ifndef win32} {$include unixstuff.inc} {$endif} -{$include ltimevalstuff.inc} {!!! added sleep call -beware} @@ -283,15 +276,15 @@ begin inherited destroy; end; -procedure tlcomponent.releasetaskhandler(wparam,lparam:longint); -begin - free; -end; +procedure tlcomponent.releasetaskhandler(wparam,lparam:longint); +begin + free; +end; procedure tlcomponent.release; begin - addtask(releasetaskhandler,self,0,0); + addtask(releasetaskhandler,self,0,0); end; procedure tlasio.release; @@ -449,13 +442,13 @@ begin end; end; -procedure tlasio.sendstr(const str : string); +procedure tlasio.sendstr(const str : tbufferstring); begin putstringinsendbuffer(str); sendflush; end; -procedure tlasio.putstringinsendbuffer(const newstring : string); +procedure tlasio.putstringinsendbuffer(const newstring : tbufferstring); begin if newstring <> '' then putdatainsendbuffer(@newstring[1],length(newstring)); end;