ne0bot / delphionrails

Automatically exported from code.google.com/p/delphionrails
0 stars 0 forks source link

RWSocket WriteTimeout set #3

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
perhaps FReadTimeout should be FWriteTimeout,

function TRWSocket.Write(var buf; len, Timeout: Cardinal): Cardinal;
begin
  if (FReadTimeout <> Timeout) then
  begin
    setsockopt(FSocket, SOL_SOCKET, SO_SNDTIMEO, @Timeout, SizeOf(Timeout));
    FWriteTimeout := Timeout;
  end;

  Result := Winsock.send(FSocket, buf, len, 0);
end;

just learn dor, very excellent work.

kenter

Original issue reported on code.google.com by kenters...@gmail.com on 31 Aug 2011 at 2:21

GoogleCodeExporter commented 8 years ago
also function TSSLRWSocket.Write(var buf; len, Timeout: Cardinal): Cardinal;

Original comment by kenters...@gmail.com on 31 Aug 2011 at 2:23

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
procedure THTTPStub.ProcessRequest;

...
      FCompress := False;
      FErrorCode := 304;
      FSendFile := '';
      Exit;
...

  end else
    FErrorCode :=  404;

need add FindClose(rec) before FErrorCode 304 and 404, 
or better enclose with a try ... finally ... end after FindFirst.

Original comment by kenters...@gmail.com on 1 Sep 2011 at 10:06

GoogleCodeExporter commented 8 years ago

Original comment by hgourv...@gmail.com on 13 Feb 2014 at 4:16