Re: Need http server source to look at

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



There is a simple MFC-based sample here: "Where can I find examples of
socket programs?" at http://www.codeguru.com/forum/showthread.php?t=326666

It's pretty old, though, around the time of transition from HTTP/0.9 to
HTTP/1.0. But it's in article-format, and gives an explanation of what is
needed for a simple server, so the article's text might be more helpful to
you than its code.

Mike

"Angus" <nospam@xxxxxxxxx> wrote in message
news:OriS%23xnjHHA.5012@xxxxxxxxxxxxxxxxxxxxxxx
I have had a look at some source code and it basically looks fairly
straightforward for simply GET type output. you just get the file
requested
and spit it out to the client.

I do have another question though. The http server is for configuring my
server. So it will have buttons to do things. I want all this to be as
easy as possible. Is it best I use JavaScript on say an onclick on the
button - to eg request something from the server? My program then
responds
with some output. But that is what I am trying to get my head round. If
the button eg said CheckStatus - I would want a function which checks
something in my program to be called and then report back the results.
How
do I call this from the client? What do I need on the server end? Can my
program just check if request is x and then run an internal function and
then just output whatever is required?

I hope my explanation of what I want to do is clear. A bit like eg an
embedded http server in a router firmware.

Angus



"Alexander Nickolov" <agnickolov@xxxxxxxx> wrote in message
news:ONEMkTnjHHA.3708@xxxxxxxxxxxxxxxxxxxxxxx
HTML is irrelevant for a web server - it doesn't need to understand
HTML. The web server only cares about HTTP - HTML is one of
the possible formats of the data that is being returned. The client
does need to be concerned with HTML, but not the server. With
that said, a server extension that generates HTML will naturally
concern itself with the format. However, the core web server won't
care about that - it only knows its extension interface.

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@xxxxxxxx
MVP VC FAQ: http://vcfaq.mvps.org
=====================================

"Andrew McNab" <AndrewMcNab@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:423AF96F-A0D0-4D49-BBE8-6AB8184CB7BD@xxxxxxxxxxxxxxxx
A good starting point would be to start a listener on port 80 with
supporting
code that handles multiple sockets (i.e. multiple clients accessing
the
http
server at the same time).

You can then either find documentation that is relevent to the
proprietry
data format used for sending web page data to clients or obtain a 3rd
party
library that already handles these things. You probably want to start
with
something that parses html files into a function or functions to
process
it
for transmission. I'm not too sure if it's as simple as sending it
byte
for
byte or if it needs a header attached or if special bytes are used to
shorten
standard html tags into a single byte for some sort of compression.

Give the web development forum a shot on specifics for html etc or
references to shipped libraries you can use.






.



Relevant Pages

  • Re: Upgrading an OLD (Fortran Powerstation 4.0) compiler
    ... Jeffrey Katz wrote: ... One idea that I had was to use HTML forms to ... web server. ...
    (comp.lang.fortran)
  • Re: Mixed language programming: C++, C# and Perl
    ... create having the current HTML and PNG file as its content? ... You mention CGI, does that imply there's a web server involved too? ...
    (microsoft.public.vstudio.general)
  • Re: How to do a post back when user press enter.
    ... It is hosted on a web server, ... the client browser, which is designed to read and interpret HTML. ... UI, via the event handler. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Ribbon Tab focus
    ... I'm trying to think how of any of these scenarios I just mentioned in this post that could be easily done without a web browser control? ... If you understand the .net framework and technologies, you'll realize that Access Web services does not create sharepoint pages but in fact creates real .net "XAML" or so called "zammel" forms. ... Perhaps now are you going to suggest that visual studio and .net is to be dumped and all those wonderful technologies that they'd been building up for about 10 years, and now we are to simply produce simple HTML forms that nobody really can use anywhere with only incredibly limited functionality? ... So, there is no such technology that exist in the web world today that you can simply publish some web page up to a particular server without ADOPTING a particular coding language, a particular framework, a particular database server. ...
    (comp.databases.ms-access)
  • Re: PHP-Yes, HTML-No --- Why?
    ... The .html signifies that the file contains HTML - and pretty ... A php script contains both HTML and PHP code so technically speaking it's not just HTML. ... The user is getting a file from your web server, an HTML file, and it has an extension of something other than HTML. ... I hope you weren't configuring them as per your personal likes and dislikes but instead were configuring them as per the customer requirements and for speed, ...
    (comp.lang.php)