Digging Around In Old State Machines

I've finally begun to start implementing Stream Management in C++ for Iris.

Detecting the stream feature and enabling stream management, while sounding like a quite simple task, was a small adventure on its own.

Iris code that handles the whole XMPP login process (STARTTLS, TLS, compression, binding) dates back to 2004. Back then it has been designed as a state machine you run through during login and end up in a simple proxy state. Altogether this approach means mixing the code of complete distinct features like binding and SASL together in a couple of state handling functions using large if/elseif/elseif/... blocks.

Luckily Justin Karneges, the main author of Iris, was online and he could help me out with some debugging.

So what's next on the list: acknowledge the request of the server and sending own requests.

Finally, now that both the XSF and Google packages are underway, it should give me some extra motivation for coding.

This page was posted with tags (none).