MSNP10 protocol analysis 05. Text information [by progsoft]

xiaoxiao2021-03-06  86

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 Trid n message total length mime-version: 1.0 Content-Type: text / plain; charset = UTF-8 X-MMS-IM -Format: fn = parameter fn; EF = parameter EF; CO = parameter CO; cs = parameter CS; PF = parameter PF message body

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 Trid u message total length MIME-VERSION: 1.0 Content-Type: Text / X-MSMSGSControl TypingUser: User Passport

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 , fixed header, specified type Typinguser : User Passport , user passport, refers to user account

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 User Message: 1.0 Content-Type: Text / Plain; Charset = UTF-8 X-MMS-IM-FORMAT: FN = Parameter Fn; EF = Parameter EF ; CO = parameter CO; CS = parameter CS; PF = parameter PF Message Text

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 user said message total length MIME-VERSION: 1.0 Content-Type: Text / X- MSMSGSControl TypingUser: User Passport

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.

转载请注明原文地址:https://www.9cbs.com/read-121751.html

New Post(0)