Network 版 (精华区)
发信人: zzn (爱你到内伤), 信区: Network
标 题: mms协议英文资料(24)
发信站: 哈工大紫丁香 (2003年08月23日10:56:16 星期六), 站内信件
Lets talk a little about the ASF format
ASF or ‘Advanced Systems Format’ developed by Microsoft, is a media file
format just like many others e.g. AVI, RM and MOV. ASF is not to be confused
with MMS protocol, although you will see the two being used together in
nearly all applications of Windows Media streaming.
Background to ASF
We need to know certain things about the ASF file format. This document will
not go into great detail about ASF, information is already available on other
web sites. What we can say here is that the format version we need is 1.0 and
not 2.0. Version 2.0 being the version that Microsoft developed later and
then decided not to use. The two versions are quite different in key areas.
Microsoft has not released details* on v1.0 probably again like MMS protocol,
trying to keep the whole thing under their control. Version 2.0 has been
published, but is of no use because it has never been implemented (as far as
I know of).
*Latest News : - MicroSoft has now revealed its ASF 1.0 spec and is now
posted on their website.
Date: 3rd Feb 2002. Use that document alongside this one and you get the
whole picture.
Locally generated GUID numbers
When communicating with a streaming server, it is required that you send a
locally generated GUID (during command 01). A GUID is a specially generated
unique random number which can only be generated from your computer. The
system is used commonly with applications over the internet. This client GUID
is of the same format as the GUID’s used in ASF headers i.e. 16 bytes long
(128 bits). Although the application is some what different and should not be
confused. Client GUID’s are used by streaming servers to keep track of
clients address while streaming, data can be routed back to the exact
connection. Log files can also be made at the server with data statistics
become available. Your own GUID will always be different, every time you send
a GUID, it is what it says – unique at that time. It will never be repeated
by your computer or anyone else’s computer, well, not possibly until after
the year 3100 when GUID values will start to wrap around again.
MMS Proxy Servers
MMS protocol can work through a proxy server as well as a direct connection
to a streaming server. This may be required if you are operating within an
intra-net or local area network. An example of this could be a business
network with a shared server (or proxy server) for all the clients to access
the outside world internet. Proxy servers usually have security restrictions
in place like firewall and email checking measures. A client operating within
an intra-net like this can only access the outside world (internet) via such
a server. This means a client wanting to access a streaming server outside
the network must access it via their proxy server. Assuming the IT
administrator of the proxy server allows the ports required for streaming
media (windows uses port 1755 for commands and usually 7000 for UDP streams)
then this can be achieved by setting media player to connect to the proxy
server rather than directly to the streaming server. The effect is that the
proxy becomes transparent. A client is effectively connected to the streaming
server without any concern of the proxy’s operation.
Normally what happens during a direct connection is this:
The media URL is first examined and the IP address (or domain name) is
resolved from the address entered. Like : mms://this.server.net/myfile.asf
would give ‘this.server.net’ as the domain name. Once this domain is
resolved using a DNS resolver or similar function then you may end up with a
direct IP address looking something like: 123.456.789.123. This is the actual
TCP socket address that the MMS protocol will connect to. All commands using
MMS communicate using this IP.
But with a proxy server we do this:
Ignore the media URL domain and allow the proxy option URL to override the IP
address of the URL domain name. This allows the client to connect directly to
the proxy IP, rather than the streaming server itself. You can also override
the Port number for the connection too. So instead of TCP port 1755, any port
number could be used. Remember that the proxy server ‘redirects’ its data
to the actual streaming server over the internet. Therefore the port you use
to connect to the proxy is only what the proxy needs and is not necessarily
what the streaming server needs. Of course, redirection from your selected
proxy port to the required 1755 streaming media port would have to be set by
the IT administrator of the proxy. This cannot normally be set by the client
for security reasons.
Note 1: Although a proxy connection does not require the domain name or IP
part of the media URL, this data is still used to formulate the client to
server MMS command 0x01, and is referred to as ‘Host’ in that command.
Note 2: Versions of media player less than 7.0 do not support MMS proxy
servers. And the command 01 does not send the ‘Host’ data field for that
reason. HTTP protocol proxies are support by all players.
--
如果世界上每个地方都可以看到月亮,
那就让我搬到月亮上去悄悄看你。
※ 来源:·哈工大紫丁香 bbs.hit.edu.cn·[FROM: 202.118.243.49]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:2.328毫秒