HTTP and Servers, Oh My!

So as I mentioned before, I’m expected to make periodical updates on project status for one of my Computer Science classes. Although the class that requires blog updates is Computer Networking, I find that I’ve been spending most of time recently working on a Java Applet for my Web Programming class (Java, JSP, etc) since that has an earlier due date.

However, I can report that I have made some progress working on the first project. I have the server listening on a socket, accepting a connection, and having an exchange with a client. Now, the project is to write a basic HTTP server, which I could probably accomplish fairly easy using straight C, but to be honest I’ve been so immersed in Object Oriented Programming that I truly think in those terms – so I’ve decided to implement using C++.

The plan is to have the main function manage the connection, then take incoming data and parse them into HTTPRequest objects then use the HTTPRequest objects to generate HTTPResponse objects that can be serialized to strings and sent back over the connection. So, while I haven’t implemented the objects yet, I have defined all of their headers and class members – so I’ve already got a pretty detailed specification of what each method will do.

I’m optimistic that once I get all the socket management stuff down in the main function then the rest of the code will be a cakewalk, because it will almost entirely be string manipulation from that point forward. Gotta love OOP.

Leave a Reply

You must be logged in to post a comment.