Home arrow HTML arrow Page 5 - The MSN Messenger Protocol Torn Apart: Part 1/3
HTML

The MSN Messenger Protocol Torn Apart: Part 1/3


Ever wanted to build your own MSN messenger? In this article series Neville rips apart the MSN messenger protocol for all to see. It's a must read for any developer!

Author Info:
By: Neville Mehta
Rating: 5 stars5 stars5 stars5 stars5 stars / 93
October 20, 2002
TABLE OF CONTENTS:
  1. · The MSN Messenger Protocol Torn Apart: Part 1/3
  2. · Digging Into the Protocol
  3. · The Workings of the Protocol
  4. · Change Your Initial Status
  5. · Order the List
  6. · User Statuses
  7. · Conclusion

print this article
SEARCH DEVARTICLES

The MSN Messenger Protocol Torn Apart: Part 1/3 - Order the List
(Page 5 of 7 )

Now is the time to ask for your contact list. Before I proceed, let me tell you about the four types of lists. Firstly we have the forward list denoted by 'FL'. It consists of the users on your contact list. Secondly we have the reverse list denoted by 'RL'. It consists of all the users who have added you to their contact lists. Thirdly we have the 'AL' or the allow list. These are the users who are allowed to see your online status. Finally, we have the block list denoted by 'BL'. These are the users who you have blocked. Get the idea? Let me summarize it for you once more:

  • FL – Forward list (Users who you have added to your contact list)
  • RL – Reverse list (Users who have added you to their respective contact list)
  • AL – Allow list (Users who are permitted to see your status)
  • BL – Block list (Users who are not permitted to see your status)
We have a command called LST, which we could use to request any of these lists. The command we would send to the server to request our forward list would look like this:

LST 8 FL

Firstly, we have the command identifier LST. Next we have the transaction id of this command. Finally, we have a two-letter list code that we want to request from the server. Yes, you could replace FL with RL, AL or BL, depending on which list you want to request from the server:

LST 8 FL 35 1 4 yourpal1@hotmail.com Pal1 0
LST 8 FL 35 2 4 yourpal2@hotmail.com Pal2 1
LST 8 FL 35 3 4 yourpal3@hotmail.com Pal3 2
LST 8 FL 35 4 4 yourpal4@hotmail.com Pal4 1


The server replies to us with all of the users on our list. There are four lines because we have four users on our list. Lets look at what all of these parameters the server sent us mean.

Firstly we have the command identifier LST. Then we have the transaction id (which is the same as one we sent to the server. This is just to let us know that all of these commands are in response to that one LST command we sent to the server). The next parameter is something called a list version id, i.e. 35 in all the lines.

Next we have the users serial number. It's just like a normal counter. After that, we have a parameter that tells us the total number of users in this list. In this case it is 4. Moving on, we have the email id of the user on our list. The screen name of the user is next, followed finally by the group id.

I haven't yet come to groups so lets keep that pending for now but do keep in mind; the last parameter is the group id of that respective user.

More on Statuses
Once you are connected to your messenger account, the server would send you the status of each user on your list. We did use the CHG command initially. Do you remember what that was for? Yes, that was to change our initial status. The command looked like this:

CHG 7 HDN

The transaction id we used for this command was 7.

Remember that whenever the server notifies us of the status of users on our contact list, it would send us necessary commands using the same transaction id we used to send the CHG command to the server. In this case the server would use 7. Lets have a closer look:

ILN 7 BSY yourpal1@hotmail.com Pal1
ILN 7 AWY yourpal2@hotmail.com Pal2


These are the commands that the server sent us once we connected to our messenger account. We assume there are just two people on our contact list. Each line denotes the status details of a user. We start of with ILN, which is the command identifier. It is the command used to notify initial statues of users on your forward list. Then we have the transaction id i.e.7 (I already explained why it is 7). Next we have the current status of that user. In the first line it is ‘BSY’ that denotes Busy. In the second line it is 'AWY' that denotes Away. We have a list of parameters that denote the current status of the user. For e.g. NLN denotes online, AWY denotes away, PHN denotes on the phone etc.

A list of these parameters and what each one does is present in Microsoft's official draft on the protocol. I have attached the same at the end of this article. Lastly, we have the respective users email id and finally his screen name.

Apart from these steps, the messenger has to be ready for many other commands sent to the client from the server. The client should understand, recognize and respond to every kind of command sent to it from the server to avoid any kind of errors.
blog comments powered by Disqus
HTML ARTICLES

- Does HTML5 Need a Main Element?
- Revisiting the HTML5 vs. Native Debate
- HTML5: Not for Phone Apps?
- HTML5 or Native?
- Job Hunting? Freelancer.com Lists This Quart...
- HTML5 in the News
- Report: HTML5 Mobile Performance Lags
- The Top HTML5 Audio Players
- Top HTML5 Video Tutorials
- HTML5: Reasons to Learn and Use It
- More of the Top Tutorials for HTML5 Forms
- MobileAppWizard Releases HTML5 App Builder
- HTML5 Boilerplate: Working with jQuery and M...
- HTML5 Boilerplate Introduction
- New API Platform for HTML5

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials