Usually I wouldn't be so excited about a monday, but I'm on vacation this week, so monday means I have a while before I have to go back to school! I finished the very basic HTTP functionality for LibNAT. It is able to perform simple Get and Post requests, which is pretty cool. It is always fun calling a few functions and retrieving the contents of web pages. One thing I didn't implement, though I'm debating whether I should, is chunked encoding. For the purposes of performing UPnP requests over HTTP, encoding will never be chunked, but most dynamic web pages are served under chunked encoding. It wouldn't take much more code, and I would have a pretty cool, very small, very basic HTTP client. For now I think I'll move on to coding the SSDP client functionality.
The road map for the rest of this project is pretty straightforward. After the SSDP client is complete, I will tackle the actual UPnP protocol. The protocol itself is composed of very basic xml requests over HTTP, so it shouldn't be too much longer before I have a working library. To make matters even better, I spent most of the past summer pulling my hair out over non standard conforming routers, so I'm already familiar with exactly how I should be formatting the messages to make everybody happy.
I've been mulling over how I should be parsing the XML requests. It wouldn't be very secure to do it with standard string functions, so I've decided to use the expat xml parser. This library will work great because it has been tested extensively over the past few years and it is licensed under the MIT license, which won't limit the library to be used by a variety of other applications, proprietary or open source.
Recent Comments