Microsoft & .NETVisual C#STL-based Web Server and Utility Classes

STL-based Web Server and Utility Classes

Developer.com content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

The socket classes are:

  • Socket
  • ServerSocket

These feed handler classes:

  • SocketHandler
  • ServerSocketHandler
  • HttpSocketHander

Socket notification comes from the abstract class SocketNotify which SocketHandler implements. A ref can be passed in to override the notification.

The http request classes are:

  • HttpBuffer
  • HttpRequest
  • HttpRquestProcess
  • HttpResponse

The request class allows you to create requests or to store a request. the request process processes requests by passing in a pointer to a buffer. the request process class gets initial info like url and then forms a response.

The startup code is in Server.cpp which delcares an instance of HttpServer. To set up the code to run set the directory where your web pages are and then compile and run.

There are also several utility classes that can be used to replace mfc classes. They support Files, Strings, Pipes, Events, Threads, Locks, Sockets and ServerSockets. Only the class for strings is a drop in replacement. Sorry, but I dont have time to manufacture the MFC interfaces, but if you want they are their for you to use.

I would like to here any comments on how to improve performance or how to better implement the web server. So if you get time, please feel free to email me.

Downloads

Download source – 143 Kb

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Latest Posts

Related Stories