The following introduction is divided into sending and receiving
To this, you should be able to build sessions, if not, read the previous document.
First, send text information client send >>> MSG 3 N 119 / R / N MIME-VERSION: 1.0 / r / n content-type: text / plain; charset = UTF-8 / R / N x-MMS-IM -Format: fn = arial; EF = I; CO = 0; cs = 0; PF = 22 / r / n / r / n hello!
Syntax format: MSG
MSG and N, indicating the total length of the text message message, that is, all bytes from MIME to message body MIME-VERSIS: 1.0, fixed header Content-Type: text / plain; charSet = UTF-8, fixed header, UTF- 8 indicate the message encoding type X-MMS-IM-FORMAT: FN = parameter FN; EF = parameter EF; CO = parameter CO; CS = parameter CS; PF = parameter PF, text information format setting, including font, font, color, Information message for information, this is the text message you want to send.
The X-MMS-IM-Format parameter introduction is described later.
Second, send the input alert client to send >>> MSG 4 U 92 / R / N MIME-VERSION: 1.0 / r / n content-type: text / x-msmsgsControl / r / n Typinguser: example@hotmail.com/ R / N / R / n syntax format: MSG
MSG and U, indicating that the total length of the input reminder message is sent, that is, from MIME to the last byte length mime-version: 1.0, fixed header Content-Type: Text / X-msmsgsControl
After sending this message, all users of the same session will receive a user (Example@hotmail.com) is entering a reminder.
Third, receive text information server response <<< msg user01@hotmail.com user01_nickname 119 / r / n mime-version: 1.0 / r / n content-type: text / plain; charset = UTF-8 / R / N x- MMS-IM-FORMAT: FN = Arial; EF = I; CO = 0; CS = 0; PF = 22 / R / N / R / N Hello! Syntax Format: MSG
User Passport and the user say that it is pointed out that the user account of the sender and the other parameters, the same, send text information.
Fourth, receive the input reminder server to respond <<< msg user01@hotmail.com user01_nickname 92 / r / n mime-version: 1.0 / r / n content-type: text / x-msmsgscontrol / r / n type tSMSGSCONTROL / R / N TYPINGUSER: example @ Hotmail .com / r / n / r / n syntax format: MSG
User Passport and the user say that it is pointed out that the user account of the sender and the other parameters, the same "II, send the input reminder"
Congratulations, to this, you should simply implement the MSN's function, including login users, user status changes, and send receive text information. However, this is very incomplete, other functions are sent later.