Indeed, it is possible, and even not extremely complicated.
The global idea would be: set a 'server' socket to listen on the desired
port. and wait for connections.
when you get a connection, it should spawn a new socket dedicated to that
connection (and the server one will keep listening)
then read the data in throught the socket, parse it according to the HTTP
spec, do whatever processing is required (generating data, finding files,
whatever your application is to serve) and then post your awnser back into
the socket.
All/most of the "low" level transport will be dealt with by the sockets (as
long as you give them the right parameters).
Good luck
Jonathan
On 9/18/07, Per Westermark <pw...@ia...> wrote:
>
> How? That is not possible to answer without presenting full source.
>
> Yes, it is possible but you must know how to write a HTTP server. Quite
> little code is transport-related.
>
> /pwm
>
> On Mon, 17 Sep 2007, angel dario wrote:
>
> > Is it possible to build a very simple HTTP server using Windows Sockets=
?
> > If so, how?
> > _________________________________________________________________
> > More photos; more messages; more whatever =96 Get MORE with Windows Liv=
e=99
> Hotmail(r). NOW with 5GB storage.
> >
> http://imagine-windowslive.com/hotmail/?locale=3Den-us&ocid=3DTXT_TAGHM_m=
igration_HM_mini_5G_0907
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
--=20
<Morpheus> linux, c'est une question de VI ou de MORE
|