#1 Re: mORMot 1 » HTTP server using fast http.sys kernel-mode server » 2011-06-29 08:49:02

I see, I might have been misslead by the Sample. you need to create clones to make it work.

Sorry about this. sad

#2 Re: mORMot 1 » HTTP server using fast http.sys kernel-mode server » 2011-06-29 07:26:48

BTW:
http://msdn.microsoft.com/en-us/library … 85%29.aspx

pOverlapped [in]

    For asynchronous calls, set pOverlapped to point to an OVERLAPPED structure; for synchronous calls, set to NULL.

    A synchronous call blocks until all response data specified in the pHttpResponse parameter is sent, whereas an asynchronous call immediately returns ERROR_IO_PENDING and the calling application then uses GetOverlappedResult or I/O completion ports to determine when the operation is completed.

As far as I see the server uses the synchronous call...

#3 Re: mORMot 1 » HTTP server using fast http.sys kernel-mode server » 2011-06-29 07:17:56

I even tried different computers (downloading from a laptop, browsing from my IPad). Same effect. smile

And the PC the "server sample" is running on has more than enough power to handle this with ease.

#4 Re: mORMot 1 » HTTP server using fast http.sys kernel-mode server » 2011-06-28 20:37:42

I''m not so sure.

Thinking about all those casted pchars in the Resp structure and the filehandle itself. I have some doubts all this gets duplicated in the http.sys so that there are no memory allocation problems and free floating filehandles...

#5 Re: mORMot 1 » HTTP server using fast http.sys kernel-mode server » 2011-06-28 18:31:43

I simply used the Sample 09 - HttpApi web server, selected a 4 GB file to download (takes even local 2 minutes) and tried to open the page in another browser tab and nothing came up until the download was done.

After a little bit of of debugging it showed that

procedure THttpApiServer.Execute;
[...]
   Http.SendHttpResponse(fReqQueue,Req^.RequestId,0,Resp^,nil,bytesSent);
   finally
      FileClose(FileHandle);
   end;
[...]

the server does wait for Http.SendHttpResponse to finish.

Maybe there should also be a thread pool for client requests like in the delphi httpserver...

#6 Re: mORMot 1 » HTTP server using fast http.sys kernel-mode server » 2011-06-28 14:37:25

I played around with the httpAPI server a little bit. Is it meant to be a blocking single client server?
I noticed no other client is processed if a really big response (as example a 2 GB file) is send...

Board footer

Powered by FluxBB