\r
\r
const\r
- receivebufsize=1460;\r
+ receivebufsize=1460*8;\r
\r
var\r
absoloutemaxs:integer=0;\r
onfdwrite : procedure (Sender: TObject; Error: word) of object; //added for bewarehttpd\r
lasterror:integer;\r
destroying:boolean;\r
+ recvbufsize:integer;\r
function receivestr:string; virtual;\r
procedure close;\r
procedure abort;\r
var\r
sendflushresult : integer;\r
tempbuf:array[0..receivebufsize-1] of byte;\r
+ a:integer;\r
begin\r
if (state=wsconnected) and writetrigger then begin\r
//writeln('write trigger');\r
writtenthiscycle := false;\r
if (state =wsconnected) and readtrigger then begin\r
if recvq.size=0 then begin\r
- numread := myfdread(fdhandlein,tempbuf,sizeof(tempbuf));\r
+ a := recvbufsize;\r
+ if (a <= 0) or (a > sizeof(tempbuf)) then a := sizeof(tempbuf);\r
+ numread := myfdread(fdhandlein,tempbuf,a);\r
if (numread=0) and (not mustrefreshfds) then begin\r
{if i remember correctly numread=0 is caused by eof\r
if this isn't dealt with then you get a cpu eating infinite loop\r