Connected
The MSN Messenger protocol is established above TCP / IP. In addition to file transfer and voice chat, all other situations are performed through the server.
On logic, there are three types of servers, each of which:
Dispatch Server, DS) - the server initially connected. Responsible to assign a suitable notification server to the client. The domain name is Messenger.hotmail.com, and the standard service port is 1863. After completing the dispatched task, cut off the TCP connection. Notification Server (NS) - The client needs to keep a connection server. Many tasks should be completed in this session, including login, change status, get a list of users, modify user information, launch chat, accept calls, mail notifications, exit, and so on. The service port is specified by the dispatch server, usually 1863. Wiring Server (SS) - The transit server used by the client between the client. Every time you open a chat window, the client and server create a TCP session. When the client needs to be filed or voice chat, send the system message to create a "point-to-point" session channel (which may turn to use UDP). The service port is usually 1863. The port used by the "point-to-point" communication is determined by the client automatically, such as file transfer usually uses 6891 ports. 2. Command MSN Messenger command uses a pure ASCII code. Use URL encoding for non-ASCII code characters. The syntax of the command is XXX [
205 21 / R / N In the above example, Non_Existent @ Passport.com is an unsatisfactory account. 4. Message MSN Messenger message complies with MIME 1.0 standard, consists of a message header with a message. Utfly UTF-8 encoding, the URL encoding format is also required in the message header, and the message body is directly used in binary data. Examples of a MSN Messenger message are as follows: MIME-VERSION: 1.0 / r / n
Content-type: text / plain; charset = UTF-8 / R / N
X-MMS-IM-FORMAT: FN =% E5% AE% 8B% E4% BD% 93; EF =; CO = 0; CS = 86; PF = 0 / r / N
/ r / n
BHW98 / XE4 / XBD / XA0 / XE5 / XA5 / XBD / XEF / XBC / X81 is simple to analyze, "% E5% AE% 8B% E4% BD% 93" is a UTF-8 plus URL encoding of "Song", "BHW98 / XE4 / XBD / XA0 / XE5 / XA5 / XBD / XEF / XBC / X81" is "BHW98 Hello!" UTF-8 encoding. Command list
The source of commands Go to the description note on the ACK SS Client confirmation, make a sure answer. The AcknowledgeMentAdd Client NS issues a request to add a new contact to the list. Add Userns Client Returns an answer to add a new contact request. The Adg Client NS issues a new contact group request. Add Groupns Client Returns an answer to add a new contact group request. ANS Client SS accepts a chat connection request. The Answerblp Client NS setting is a confidentiality policy that has not been included in the contact list that is clearly allowed / forbidden. Block List Privacyns Client Returns a response to setting a confidential policy request. BYE SS Client Notifies the client ending session. Byecal Client SS issued a request for a chat connection. Callss Client returns a response to establish a chat connection request. CHG Client NS issued a request for a change. Change Statens Client Returns a response to changing the status. The CHL NS Client server issues a verification requirement. Challenges CLIENTCVR Client NS issues information such as OS, language, MSN Messenger version. Client VersionClient Ssns Client Returns the recommended MSN Messenger version, upgrade the software you need download address and other information. SS Clientfln NS Client Notificates the user's underscore in the contact list. OFF-LineGTC Client NS Setup When a prompt given when a user status in a contact list is changed. Greeting to changes? ns client returns a response to the setup request. The INF Client NS asks the authentication method supported by the server. INFORMATION? Client SSNS Client Returns the authentication method supported by the server. SS Clientiln NS Client When the client logs in or adds a contact to a list, the status of the contact in the list is notified. Initial Online Stateiro SS Client When there is a new user to join a chat connection, inform the client list in this connection. Initial Roster InformationJio SS Client Notification The client has established a chat connection with additional users. Jionlsg Client NS issues a request for obtaining a list of contact groups. List groupsns client returns a response to get a list of contact groups. The LST Client NS issues a request for obtaining a list of contacts. Listns client returns a response to get a contact list request. MSG Client SS Sends a message to other users (chat objects). Messagens Client Transfer Server (System) message to the client. SS Client passes the message to the client (chat object) to the client. NAK SS Client makes a negative answer. NEGATIVE ACKNOWEDGEMENTNLN NS Client Notifies the client contact online or changed. ON-Lineout All ALL ends the client-server connection. OUTPNG Client NS Tests TCP Connection Status. PingClient SSPRP Client NS issues a request for a personal phone number. Personal Phone Numberns Client Returns the Connection of the Setup request PNG Client NS test TCP connection status. PingClient Ssqng NS Client Returns a response to test TCP connection status. QUIZ PING? SS ClientQry Client NS Client Answer Server Verification Requirements. Quiz Reply? Client SSREA Client NS issued a request to modify the user nickname. Rename Nicknamens Client returns a response to modify the user nickname request. The REG Client NS issues a request to modify the contact group. Rename Groupns Client returns a response to modify the contact group request. The REM Client NS issues a request from the contact list.
Rename Userns Client returns a response to delete user requests. RMG Client NS issues a request for deleting contact groups. Remove Groupns Client returns a response to deleting a contact group request. RNG NS Client Notifying the client Someone wants to establish a chat connection. Ringsyn Client NS Client - Server Synchronization. Synchronizationns ClientURL Client NS issues a request for acquiring the MSN service URL. URLNS Client returns a response to get URL requests. USR all all declarations, passes, identify user identity. Userver Client DS negotiation MSN Messenger protocol version. VersionClient NSDS Clientns ClientxFR DS Client assigns NS to the client (notifying the client steering connection specified NS). TransferClient NS issues a request for allocating SS. NS Client returns a response assigned an SS request. MSN Messenger Agreement - Error Code List
Code Meaning Possible Command Error Demolving 200 illegal Command ABC 18 / R / N200 18 / R / N 201 illegal parameters CHG 19 FLN 0 / R / N201 19 / R / NADD 20 Al AAA @ BBB @ CCC AAA @ bbb @ ccc / R / N201 20 / R / N 205 users do not exist add add 21 al none@hotmail.com none@hotmail.com/r/n205 21 / R / N 206 Miss Domain Name 207 Already logged in USR USR 20 TWN I Example @ Hotmail .COM / R / N207 20 / R / NUSR 21 TWN S 8D30FC782AA25EC9E1293FDDA13CAB42 / R / N207 21 / R / N 208 illegal user name CAL CAL 2 @@ Hotmail.com / R / N208 2 / R / N 209 illegal user nickname REA REA 18 One@hotmail.com Kill% 20Microsoft / R / N209 18 / R / N 210 users too many add add 23 fl one@hotmail.com one@hotmail.com 0 / R / N210 23 / R / N largest 150,215 users Add add 36 fl one@hotmail.com 2 / r / nadd 36 825 fl one@hotmail.com 2 / r / nadd 37 fl one@hotmail.com one @ @ Hotmail.com 2 / R / N215 37 / R / N Cal Cal 5 Two@hotmail.com/r/ncal 5 ringing 213697 / r / ncal 6 Two@hotmail.com/r/N215 6 / R / N216 User is not listed Rem Rem 14 Fl Three@hotmail.com/r/N216 14 / R / N Rea REA 48 Three@hotmail.com Three / R / N216 48 / R / NCAL CAL 2 three@hotmail.com/r/n216 2 / R / N217 User is not online Cal Cal 2 Two@hotmail.com/r/n217 2 / r / n 218 is already specified BLP BLP 17 BL / R / NBLP 17 151 BL / R / NBLP 18 BL / R / N218 18 / R / N GTC GTC 19 A / R / NGTC 19 152 A / R / NGTC 20 A / R / N218 20 / R / N219 User has already in the opposite list Add add 15 al fund@hotmail.com four@hotmail.com/r/nadd 15 Al 56 Four@hotmail.com Four / R / NADD 16 Bl Four@hotmail.com Four @ Hotmail.com/r/N219 16 / R / N 223 User Group too many Adg ADG 28 new% 20group 0 / R / N223 28 / R / N max 30224 illegal group number Add RMG 24 3 / R / NRMG 24 11506 3 / R / NADD 25 FL FIVE@hotmail.com 3 / R / N224 25 / R / N Rem RMG 24 3 / R / NRMG 24 11506 3 / R / NREM 25 FL FIVE @