Tuesday, November 26, 2013

Fixing SupaChat

A couple of years ago, I wrote a chat server called SupaChat Server and a lightweight client for it. A project I did for World Literature - a Beowulf text-based RPG as a SupaChat Server snap-in - reminded me of it. Like I wrote a few weeks ago, it's really not that bad. However, it has a major problem. Instead of multithreading it myself, I just had timers in the main form that triggered read and ping events. While it was pinging all the clients and actually waiting for a reply, no messages would be processed. That caused all manner of ping timeout disconnections (especially because it happened every three seconds) in my presentation. I then decided that I should refactor it to resolve those problems. It'll take a lot of rewriting to implement a proper threading and queue system, but the server should run a lot better.

No comments:

Post a Comment