The MeSsoN Project


Version History


Developer Notes
SourceForge Logo
[Developer Notes]
( A prettier version of the MeSson Dev History File!)

Developer Notes: (Now in chronological order, Newer items near top...)

29/8 - Decided to freeze the code here and open MeSsoN up to the public. This
code has been labelled 1.0.2.

28/8 - There was a major crashing bug which occured whenever I closed the
WndContacts window... I've therefore changed the code in the cancel
close to quit whenever the window is closed.. I think that the
problems were around becuase nearly everything in MeSsoN carries a
reference to wndContacts, therefore as Matt Neuberg (I think) in
Learning REALbasic said, for some reason, REALbasic can't deal with all
these abandoned references and handle them properly... Anyway, without
the main window open, there is little point to the program, so I
don't think that this is a major cludge... (Someone is of course
welcome to fix it properly...)

28/8 - You can now chage your friendlyname! (Unlisted command)
Therefore I had to add support for Friendlynames which contain a space
(I believe they exist, though none of my friends have one...)
Therefore, I think I've managed to make every reference to friendlyname
pass through a function called (oddly enough), percent20... IT seems to

28/8 - Added a MSNP2 errata file. This describes parts of the MSN protocol
that aren't mentioned in the RFC.

28/8 - Added support for finding out when you have new Hotmail e-mail.

28/8 - There is now support for Deleting users from the FL as well (Command
-Delete) or use themenu item. You can also delete entries in the AL
and BL by simply pressing the delete key. Fixed a fairly major bug in
the Preference windows. I'm now going through the routines which talk
to the server, to make sure that they check that they are connected
before they try to talk... (Problems with talking halfway through
authentication has been plaguing me slightly...) Getting closer and
closer to the initial release.

Version number is currently 1.0.2 (I've been releasing it for testing
on a limited basis.. i.e. to my brother)

27/8 - After staying up way too late going out for most of the weekend, I
wasn't in the mood to tackle those idiotic file routines.. Anyway, I
printed out the 4 or so pages of the write routine, and went through it
with one of those traditional writing implements.. The result is what I
think is now a finally debugged version of the file writing routine...
(Thank God..)

Today I've also added support for adding new users to your FL...
Presumably MSN requires you to add them to your Allowed list as well ?

21/8 - I have not been idle, but implementing this software's file write/read
routines... I have come up against a major BUG?! The main MeSsoN file
begins with a Pascal string, and I perform this line of code
file.position=file.readbyte.. I expected the readbyte to move the
pointer on by one, and then also the length of the string.. It doesn't
however, and only moves the pointer on the length of the string without
the byte taken into account.. This explains many of my problems, and I
suppose that it isn't really that stupid (but irritating..) Hopefully I
should have the first version out soon... This does of course mean
re-writing much of the file routine.. (I have multiple readbytes in one
position thing you see...)

Phew... I just did some investigation in a scrap project.. It looks
like, if you do soemthing like this
b.position=b.readbyte+b.readbyte+b.readbyte the program will actually
read three individual bytes (in order, and set the position to the
total of the 3 bytes), excluding the length of the bytes themselves.. I
love REALsoftware.. That means I don't have to rewrite my code, I just
add one for every byte and 2 for every short... woohey!!!

Also, with reading bytes for position, doing something like
b.readbyte+1+b.readbyte, will read the two concurrent bytes and then
add 1, not read the first byte, skip a byte, and then read another
byte.. That's OK though, just letting anyone else who is interested

15/8 - Fixed more bugs than I can count.. With use, they appear to be getting
slowly uncovered.. (yes, I am now using this as my full time client

15/8 - Added Preference support.. This means that the position of the contact
list is now saved on close :)

14/8 - With a few code changes, the chat now works! Font support etc. isn't
there yet, but should be soon if I can be bothered.. At least it

14/8 - Moved the dataAvailable into a separate method.. (I wanted to be able
to call it from the outside...)
14/8 - Problems associated with talking with other users... What I've done is
arguably created a kludge... I have moved the Dataavailable event
handler to a dataavail method. Created a boolean property to flag when
a specified amount of data is expected (i.e. in the case of a MSG
command). dataavail checks this boolean.. an if statememnt has been
added to the while loop to check for the message flag being raised
(which I hope should fix the problems I was having.. ) (there is noone
online right now for me to test it with.. :()
While this boolean is true, MSG is handed to the parsing routine so
that the MSG handler can check for more data.. If there is enough data,
then readmessage is called and the boolean is unflagged... (that is a
long work around.. suggestions for a more elegant solution will not go

Any help would be greatly appreciated. (The interface needs some work in the way of icons etc. (I can't stress this enough...))

*There are a few stability issues relating to REALbasic's handling of sockets in the IDE.. for some reason I think that the buffers aren't flushed after use so if the project is run twice, a crash can occur.. I don't believe that there are any similar problems with the compiled version...
13/8 I think that this is now fixed...

* There were problems reading data, as I got confused and thought that CRLF was
chr(10)+chr(13) rather than the other way round!!! This has been an embarassing mistake, but miraculiously most of the code works!!

* Most data is stored in a fasion with fields separated by chr(10), and complete sets of data, (fields), delimited by chr(10)+chr(13), this arrose due to my confusement between CR and LF... Sorry.. can be bothered to change every reference right now when everything appears to be working..

* For the chat window, I've decided to issolate the talking and listening code into two elements... Therefore to talk, the chatwindow is actually going to write straight to the socket, I know this probably violates some people's view of OOP, but MSNs chatting appears to be complicated (involving lengths, fonts, etc....), I'm therefore encapsulating all chat stuff into the wndChat's code.

* What the F**k is REALbasic doing?! Currently my situation is that I've got my main array of sockets in wndContacts, and my replicate method appending to it.. No problems right? Wrong!! the bloody thing is giving me nil Object Exception errors at random points hilighting random pieces of code! At the moment, it's even hi-lighting a comment.. REAL programmers, what the hell have you been doing with the inards of this things code?!
Anwyay, enough flaming for tonight, I must fix the problem!

13/8 this has been fixed, I am now first appending the socket (in the
replicate handler), and then setting all of it's properties.. for some
reason this works.. damn you REAL...

* Some of the IDE stability problems appear to now be gone! I noticed that I wasn't setting the wndContacts property "lord" in sckMain to point to the wndContacts windows.. Now that that is done, things appear to be more stable. Unfortunately, I'm still unsure on quite what is going on with those duplicating sockets.... grrrr...

And that's it.. There's probably a lot I haven't explained (and I know much of the source is improperly commented... This should improve in time, but using Linus's philosophy, my plan is first to get it working then add features and style... (Updates will be added in chronological order soon (I wrote this file all at once you see :))


P.S. Happy Hacking :-)

Contact Info:
ICQ: 17367554
MSN: (Don't e-mail me here)
Copyleft 2001 James Blackburn <>