-1

How to write a desktop Delphi 7 Win32 Apps with embedded Http server something like Media Player Classic with Web Interface. I need a standalone HTTP server to be launched from user's browser to a url e.g. http://:/ and request using a GET or POST and then responded from Delphi app.

qsoft
  • 424
  • 2
  • 5
  • 17
  • @DavidHeffernan Not quite. Topic starter did not settle upon using Indy, at least not yet. – Arioch 'The Apr 09 '13 at 10:31
  • This question is entirely too vague and broad in scope, and will probably do nothing but collect links to component sets. Please do some research on your own into HTTP Server components for Delphi (there's are tons of links here at SO alone), and then come back and ask specific questions once you've done so. Voting to close as not a real question at this point. Good luck. :-) – Ken White Apr 09 '13 at 12:43
  • oh I'm sorry `TIdHttpServer` is what I need, but producing the page is quite difficult in Delphi, another question is what is the best way if I want to host a file like `jquery.js` – qsoft Apr 11 '13 at 03:39

2 Answers2

1

TCP/IP libraries usually comes with demo projects. For example http://synapse.ararat.cz/doku.php/public:howto:httpsserver

There are also larger frameworks that provide HTTP server just as one of their services (which still allows you to carve that part of their code and re-use it).

For example (but Henri seems to got fed up with Embarcadero and abandoned his Delphi projects) http://code.google.com/p/delphionrails/w/list

For another example there is http://blog.synopse.info/tag/HTTP This implementation relies upon Windows http.sys driver, that was developed as a fast HTTP protocol implementation for Microsoft IIS. During recent DataSnap performance shootouts mORMot-based server, working through http.sys AFAIR, shown great performance with low overhead. BTW, Indy-based DataSnap was shown to only surviving of low to medium load.

Arioch 'The
  • 15,799
  • 35
  • 62
  • I don't think that Indy is the problem with DataSnap. Or is it? – David Heffernan Apr 09 '13 at 12:53
  • @DavidHeffernan Read the article then. Indy is based on OS-level threads and degrades awfully when many light requests come. Actor-based or other single-thread async approach scales much better. http://robertocschneiders.wordpress.com/2012/11/22/datasnap-analysis-based-on-speed-stability-tests/ – Arioch 'The Apr 09 '13 at 14:10
  • 1
    As I read that article the problem is that the design (??!!) of DataSnap is fatally flawed. If I chose to write a webserver in Windows batch, and it sucked, would the blame lie with Windows batch, or my pathetic design decision? – David Heffernan Apr 09 '13 at 14:22
  • batch is not designed to make HTTP servers, Indy is. – Arioch 'The Apr 09 '13 at 14:42
0

Add an IdHTTPServer to the project.

Birger
  • 4,343
  • 21
  • 35