Xblaze 1.0.1
November 7th, 2009 Jasarien
Hey guys, just a heads up that Xblaze 1.0.1 is up on the downloads page. Go grab it!
- Xblaze will now show typing notifications when your friends are typing, and send typing notifications to your friends when you are typing.
- Plugged a few minor memory leaks
Burning The Midnight Oil
November 6th, 2009 Jasarien
It’s 5:08am. I’ve just committed the typing notifications code to SVN. Sleeeepy.
I’ll release an update tomorrow at some point that will include the typing notifications support.
The incoming typing notes, (those that tell you who’s typing), were simple. A few short lines of code and they were working. But the outgoing typing notes, (those that tell your friends when you’re typing), were a lot more involved. The MacFire library didn’t have a packet to represent a typing notification, so I had to write one before writing the logic to send it.
I also learned something a little odd about the way Xfire handles typing notifications. According to all the documentation I’ve read about the Xfire protocol, the typing notification packet is the same packet that contains messages and message acknowledgments. The difference between these packets is the data structure within, their IDs are all the same. With that said, the typing notification packet contains a field aptly named ‘typing’ which represents an integer.
The documentation says this is treated like a boolean, 1 for typing, 0 for not typing. So my initial inclination was to send the packet with a 1 when a user is typing, and then again with a 0 when they finish typing.
I was wrong. This caused the typing notification to keep being displayed even after a message was sent. My only guess is that Xfire (for Windows) ignores this boolean value, and just assumes that any typing note packet that arrives means that the user is typing… Either that, or the field isn’t intended to be used as a boolean. We shall most likely never know.
Good night.