web server design



I intend to write a server in this fashion.

1)Create a socket, bind it and listen on it.
2)Fork 'n' number of childs and pass the socket descriptor as
argument.
3)Each would would then do an accept on that socket descriptor.
4)when a request comes to any of the childs, the child would create a
thread to handle it.

This is just the outline. Is this a correct/good design and in right
direction? Can i replace step 1 of this with openSSL create call for
adding security?

Thanks,
Balaji.

.



Relevant Pages

  • Re: web server design
    ... bind it and listen on it. ... 2)Fork 'n' number of childs and pass the socket descriptor as ... 3)Each would would then do an accept on that socket descriptor. ... 4)when a request comes to any of the childs, ...
    (comp.unix.programmer)
  • Re: web server design
    ... bind it and listen on it. ... 2)Fork 'n' number of childs and pass the socket descriptor as ... 3)Each would would then do an accept on that socket descriptor. ... google C10K if you want an interesting article on all kinds of server architectures. ...
    (comp.unix.programmer)
  • Re: Does FD_CLOEXEC exist for sockets
    ... > I want to disable the inheritance of socket handles to childs. ... not already when forkis called, so it doesn't disables "inheritance ...
    (comp.os.linux.development.apps)
  • Re: Does FD_CLOEXEC exist for sockets
    ... >I want to disable the inheritance of socket handles to childs. ... inheritable objects in Win32 and must be duplicated. ...
    (comp.os.linux.development.apps)
  • Does FD_CLOEXEC exist for sockets
    ... I want to disable the inheritance of socket handles to childs. ... And does anyone know how i can do this with the Win32 API? ...
    (comp.os.linux.development.apps)