Web servers as MS exemplify in MSDN

  • Thread starter Thread starter Crirus
  • Start date Start date
C

Crirus

Can anyone advice me what is the best way to write a web server with
sockets?
As I have one now, inspired by MSDN... a socket listen for connection and
create new thread for each request passing a handler socket to a callback
function.

Now, what if I have 1000 request at the same time?
How many threads will be created?
How about if a request need few seconds to get reply from server?

Can someone expose to me various scenarious and the best way to handle them?

How Listen parameter work? If I specify mySock.Listen(10) does that mean 11
connection is refused..or what?
 
I need to wite my own serve and understand the implications to avoid
redesign later
:)

Don't you think looking at the source code of a complete webserver (it
even is capable of hosting ASP.NET) writen using the .NET framework
would be just a little helpful? If nothing else it would show give you
insight into what namespaces/classes in the Framework would be useful -
not to mention technique.
 
Well, I have a server allready, I wrote it... with MSDN specs.... I'm trying
to discuss here various approaches from different ppl that had some good
experience with that...
The most concerning is multithreading.. see my first post
 
Back
Top