HTML
  Home arrow HTML arrow Page 5 - The MSN Messenger Protocol Torn Apart: Par...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
HTML

The MSN Messenger Protocol Torn Apart: Part 1/3
By: Neville Mehta
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 88
    2002-10-20

    Table of Contents:
  • The MSN Messenger Protocol Torn Apart: Part 1/3
  • Digging Into the Protocol
  • The Workings of the Protocol
  • Change Your Initial Status
  • Order the List
  • User Statuses
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    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.

    More HTML Articles
    More By Neville Mehta


       · Hello, im 15 years old vb programmer and i want to make a clone of msn messenger...
     

    HTML ARTICLES

    - Comparing Browser Response to Active Client ...
    - Testing Browser Response to Active Client Pa...
    - Active Client Pages: Completing the Code for...
    - ACP and Browsers: Setting up an Example
    - How Browsers Respond to Active Client Pages
    - Completing a Tree with Active Client Pages
    - HTML Form Verification and ACP
    - Building an ACP Tree
    - Completing an ACP 3D HTML Table Image Gallery
    - Building an ACP 3D HTML Table Image Gallery
    - A Multiple Page Image Gallery with Active Cl...
    - Building an Image Gallery with Active Client...
    - Concluding a Menu for All Browsers
    - A Vertical Menu for All Browsers
    - Downloading Long HTML Pages with ACP







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek