关于MSN Messenger协议

What is MSN Messenger?

出处:http://www.hypothetic.org/docs/msn/general/overview.php

The term "MSN Messenger" is quite ambiguous, as Microsoft use the term to refer to several different parts of their instant messaging solution. You chat over the "MSN Messenger network", the most popular program to connect to the MSN Messenger network is "MSN Messenger", and the language that programs on the MSN Messenger network speak is the "MSN Messenger protocol".
"MSN Messenger" 这个字眼是相当含糊的,因为微软用这个术语关系了几个不同部分的消息解决方案.你通过"MSN Messenger 网络"聊天,用来连接MSN Messenger 网络的最流行的程序是"MSN Messenger",而程序在MSN Messenger 网络中使用的语言则是"MSN Messenger 协议"。

What is the MSN Messenger network?

什么是MSN Messenger网络

The MSN Messenger network is a presence and instant messaging network from Microsoft. It went online in July 1999, and is neither the first nor the last instant messaging network. MSN is among the top four proprietary instant messaging networks. As of March, 2003, there were far less unique users on the MSN Instant Messenger network than on AOL Instant Messenger or ICQ but more than Yahoo Messenger.
MSN Messenger网络是一个出自微软的实时通信网络。它在1999年7月发布,它不是第一个通信网络,也不是最后一个通信网络。MSN是4大顶级个人实时通信网络之一。到2003年3月,独占的MSN Instant Messenger 网络用户远远少于AOL Instant MessengerICQ,但多于Yahoo Messenger

What do programs on the MSN Messenger Network do?

程序在MSN Messenger 网络上做什么?

The program on your PC is called an MSN Messenger "client". It connects to an MSN Messenger "server" over the Internet. In broad terms, the client then sends and receives information with other clients via the server. Most of the time, your client will converse with the MSN Messenger server, which processes the information and tells other people. However, some information is simply passed on by the server without being processed. For example, when sending an instant message, the command "here is a message, pass it on" is processed by the server, but the message itself is just passed on by the server and processed by the client.
在你计算机上的程序被称为"客户端"。它通过Internet连接到MSN Messenger服务器。具体点将,就是客户端通过服务器和其他的客户端收发消息。一些信息没有处理,仅仅通过服务器简单传递。例如,当发送一个实时的消息,命令“here is a message, pass it on”被服务器处理了,但消息本身仅通过服务器传递给客户端。


Microsoft have released two MSN Messenger clients: MSN Messenger (also known as ".NET Messenger") and Windows Messenger. Microsoft recommends MSN Messenger for most Windows users, except on Windows XP, where Windows Messenger is bundled with the operating system. Other people and companies have written "third party" MSN Messenger clients. You can see some of them listed on the resources page. MSN Messenger is generally considered the de-facto standard client, and most clients take their lead from its behaviour, so it's referred to as "the official client" on this site.
微软已经发布了两种MSN Messenger客户端:MSN Messenger(也叫“.NET Messenger”)和Windows Messenger。微软向大多数Windows用户推荐使用MSN Messenger,包括Windows XP在内,Windows Messenger被绑定在操作系统中。其它人和公司已经写了“第三方”MSN Messenger客户端。你能在资源页列表中看到一些客户端。 MSN Messenger一般被认为是事实上的标准客户端,而其他大多数的客户端从它的行为中确定他们的发展方向,所以它在网上被认为是“官方客户端”。

Microsoft have never publicly released their Messenger server, and the official client doesn't allow you to connect to servers other than those operated by Microsoft. Still, some people have written third party servers, which can be found on the resources page.
微软从未公开发布过他们的Messenger服务器端,并且官方客户端不允许你连接非微软的服务器端。目前,一些人已经写了第三方的服务器端,这些能在资源页中找到。

The "language" used in communication between two computer programs is called a "protocol". The rules for messages sent between MSN Messenger clients and servers is called the "MSN Messenger protocol". The rules for messages sent from one client to another through the server is referred to on this site as the "MSN Client protocol".
在两台计算机程序间通讯使用的“语言”叫做“协议”。MSN Messenger客户端和服务器端之间消息发送的规则就叫做“MSN Messenger协议”。从一个客户端通过服务器发送消息到另一个客户端的规则在这里被称之为“MSN 客户端协议”。


What is the MSN Messenger protocol?

什么是MSN Messenger协议

The MSN Messenger protocol consists of a series of commands sent between the client and the server. For example, when someone on your contact list goes offline, the servers sends a message like this to your client: FLN myname_123@hotmail.com. On receiving this, the client should take that user out of the list of on-line users and put it into the list of offline users.
MSN Messenger有一系列可在客户端和服务器端发送的命令组成。例如,当在你联系人列表中的一些人离线时,服务器向你的客户端发送类似这样的消息:FLN myname_123@hotmail.com。当接到这个命令,客户端应该将这个用户从在线用户列表中移到离线用户列表中。

The MSN Messenger protocol has undergone several revisions over the years. At the time of writing (November 2003), Microsoft's servers allowed clients to use versions 8, 9, and 10 of the protocol. Individual protocol versions are often written as "MSNP8", "MSNP9" and "MSNP10".
MSN Messenger协议这几年已经经历了几次修改。在起草协议的时候(2003年10月),微软的服务器允许客户端使用8,9和10版的协议。个人协议版常常是由“MSNP8”,“MSNP9”和“MSNP10”写的。

This site intends to fully document the MSN Messenger protocol and quirks of MSN Messenger servers so that third party software developers can write their own programs to interact with the network. At present, only MSNP8 is documented, though there some discussion is available for MSNP9 and MSNP10.
本站点旨在完整定义MSN Messenger协议和MSN Messenger服务器断的特性,使得第三方软件开发者能写自己的程序与网络交互。到目前为止,只有MSNP8被文档化了,还有一些论题可在MSNP9MSNP10中获得。

The information on the protocol was gathered by reading the official IETF draft, reading various sources, analysing packets, analysing the official client, and writing programs. Most of this work was done by other members of the MSN Messenger research community, which we have just written up. If you have discovered something new about the protocol, please make it known on the forum.
关于协议的信息可以通过阅读官方IETF草案, 阅读各种源代码,分析数据包,分析官方客户端,写程序。大部分这样的工作由其他一些MSN Messenger研究团体完成的,而我们只是将它记录下来。如果你发现了关于协议的新的东西,请将它公布在论坛上。

What is the MSN Client protocol?

什么是MSN客户端协议?

The MSN Client protocol consists of messages sent between clients. For example, when you say "hello" to a friend, your client sends a message to their client with hello as the body of the message.
MSN客户端协议由在客户端之间发送的消息组成。例如,当你向你朋友说“hello”的时候,你的客户端将hello作为消息的主体发送他们的客户端。

Until relatively recently, the MSN client protocol grew quite organically - one version of the official client would behave differently to another, and you just had to guess what behaviour was expected by whom. Recently, attempts have been made to impose a version numbering system. As of November 2003, three versions of the MSN Messenger client protocol have been observed, which are referred to on this site as "MSNC0", "MSNC1", and "MSNC2".
直到最近,MSN客户端协议比较有组织地发展——一个官方客户端版本将和其他客户端有不同表现,你只能猜猜它会有什么谁预想的特性行为(这句翻不出来)。近期,试图已经制定强加一个版本编号系统。到2003年10月为止,已经发现有3个版本的MSN Messenger客户端协议,在本站点叫做“MSNC0” ,“MSNC1”,“MSNC2”。

This site intends to fully document the MSN client protocol and quirks of the official client so that third party software developers can write their own programs to interact with the network. We hope to fully document all versions of the protocol eventually. This site only documents the behaviour of the official client in so much as it informs us about how other clients are expected to behave. The authors of this site don't use the official client, so wouldn't do justice to the subject. There are other sites that cover this topic well.
本站点旨在完整定义MSN Messenger协议和官方客户端的特性使得第三方软件开发者们能写出他们自己的程序和网络交互。我们希望最终完整定义所有版本的协议。本站点仅仅定义官方客户端的行为跟它通知我们关于其他客户端是怎样可预见的行为(这句翻不出来)。本站作者没有使用官方客户端,所以对主体不会有公正的判断。其他一些站点很好地覆盖了这个主体。

What do Microsoft think about all of this?

关于这一切,微软是怎么想的?

We have no connection with Microsoft, and only very limited communication. We know that at least some Microsoft employees are aware of this site and the community in general, but corporate policy seems to be one of ignoring us. Microsoft haven't made any serious attempt to keep third party clients out of their network, but they've also never attempted to talk with us or give assurances about the future. They've been very receptive about reports of bugs that have security implications.
我们跟微软没有关系,仅仅是非常有限的交流。我们知道至少一些微软的员工大体上清楚这个站点和社区,但是公司的政策看起来像是在忽略我们。微软还没任何使第三方客户端从他们网络中去除的正式的尝试,但他们也从未尝试和我们沟通或者给大家关于未来的保证。他们已经非常善于接受有安全隐患的错误报告。

Compared to AOL (which owns both AIM and ICQ), Microsoft is very nice to the third party developers of its protocol. This probably doesn't reflect any great philanthropy on their part: third party clients boost the number of users on Microsoft's network and (unlike with AOL) we don't represent a direct threat to their revenue stream.
跟AOL(AIM和ICQ的拥有者)相比,微软就他的协议对第三方开发者是非常不错的了。这大概不能反映任何慈善的部分:第三方客户端促使微软的网络用户的增加,并且(不像AOL)我们不是他们收入的直接威胁

How does the protocol work?

协议是如何工作的?

出处:http://www.hypothetic.org/docs/msn/general/overview.php

MSN Messenger is a presence and instant messaging system. "Presence" is whether you're on-line, whether you're sharing a webcam, etc. "Instant messaging" is talking with other people. Users of presence and instant messaging systems (people, bots, etc.) are referred to as "principals". RFC 2778 provides a very good general overview of what a presence and instant messaging system does, and you're advised to read it if you haven't worked on one before. Where possible, technical terms used on this site have been taken from that document.
MSN Messenger是一个实时消息系统。“Presence”(这个词翻不好,不翻了)是不管你是否在线,不管你是否共享一个网络摄像头,等等。“实时消息”是和其他人交谈。“现场”和实时消息系统的用户(人,机器人等)被认为是“主角”。RFC 2778提供了一个非常好的现场和实时消息系统做什么的总纲,

An MSN Messenger session involves a connection to a "notification server" (or "NS"), which provides a presence service. The notification server allows you to connect to "switchboard servers" ("SB"s) which provide an instant messaging service.
一个MSN Messenger会话包括一个到“通知服务器”(“NS”)的连接,这个服务器提供presence服务。
通知服务器允许你连接“交换机服务器组”(“SB”s),它提供实时消息服务。

Notification Server (NS)

通知服务器(NS)

The connection to a notification server is the basis of an MSN Messenger session, as it handles your presence information: if you are disconnected from the notification server, you are no longer online to your buddies. The main purpose of the notification server is to handle presence information about yourself and the principals whose presence you've subscribed to.
连接到通知服务器是一个MSN Messenger会话的基础,因为它处理你的即时信息:如果你和通知服务器断开连接,你好友的列表上你将不在是在线的了。通知服务器的主要目的就是处理关于你的当前信息和你正在通信的联系人的当前信息。

The notification server also performs some other services like notifying you about new e-mail in your hotmail inbox and letting you create new (or join existing) switchboard sessions. When you're directed to join a switchboard session, you should open a new connection to the switchboard, and keep the notification server open.
通知服务器也提供其他一些服务,如当你的hotmail邮箱有新邮件时通知你和让你创建新的(或加入存在的)交换机会话。当你被分配加入到一个交换机会话时,你应该打开一个新的交换机的连接,并保持通知服务器处于打开状态。

Note: The original draft refers to a third type of server known as a Dispatch Server, or "DS". However, throughout our documentation, the Dispatch Server is just treated as the default notification server.
注意:起初的草稿提到第三种服务器,被认为是叫做分发服务器,或“DS”。然而,在我们的文档中,分发服务器仅仅被当作默认的通知服务器来对待。

Switchboard (SB)

交换机(SB)

The switchboard handles instant messaging sessions between principals. In other words, each person in an MSN chat corresponds to a connection to a shared switchboard session. Being in two conversations at once means connecting to two switchboard servers at once. Directly connected conversations between principals are not used in MSN Messenger, and the switchboard acts as a proxy between you and those you are chatting with.
交换机处理联系人间的实时消息会话。换句话说,


A switchboard session can have as many people in it as you like - there's no equivalent of the one-to-one conversations that there's no way of forcing a session not to accept more than two people. This can be quite awkward because some of the uses for a switchboard session (like initiating a file transfer)

The SB is also where invitations to other services such as file transfer and NetMeeting are sent and received. Mobile paging is one of the only forms of communication that does not take place over a switchboard server.

Note that the SB and the NS are not very tightly integrated. For example, when a principal in a switchboard session change his or her display name, the switchboard still sends out messages and other commands with the old display name. In addition, when a principal disconnects from the NS, all switchboard sessions still remain open until the client explicitly closes them.

 

What syntax is used in this document?

出处:http://www.hypothetic.org/docs/msn/general/overview.php

Raw Protocol

This site includes many examples of dialogues between client and server, and between two clients. Client/server dialogues are always described from the point-of-view of the client. Client/client dialogues are described from the point-of-view of one or other client. A bold monospace font is always used for these dialogues. Text sent from the (local) client is always blue. Text sent from the server (or the other client) is always green. Information about the dialogue is always bluish green.

A block of text sent by the (local) client is always preceded by >>> followed by a space. A block of text sent by the server (or the other client) is always preceded by <<< followed by a space. Other information is always preceded by <o> and a space.

At the end of a line of text sent by the server or the client, there are often newline characters. In most cases, it is a carriage return followed by a linefeed which is expressed as the light-grey /r/n. Note that this is two bytes, and is not the literal characters "backslash R backslash N". Special attention should be paid to newlines, as the simplest (and most common) programming mistakes in the Messenger protocol involve putting a newline where there shouldn't be one, forgetting to put one where there should be one, or mis-counting the size of a newline.

When short examples of protocol are found in paragraphs, such as the name of a command or an example of a nickname, they are usually found in a bold monospace red font.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值