Multicasting with NetShow


Multicasts are unidirectional communications. That is, clients simply listen to a stream of data that is sent across the network. Clients do not communicate with the multicast server that is providing the data. However, in order to receive and render a multicast, clients do require information about the multicast. The client needs to know which network address and port the multicast uses so that its network adapter can listen for data on that address. The client also needs to know what sort of data is being streamed. For example, the client needs to know whether the data is video or audio, and what codec to use to decompress the information in the stream. This version of NetShow uses two different approaches to provide that information to the client.

For multicasts that send ASF streams, NetShow uses channels to provide clients with information. To tell clients where to listen to receive the multicast, channels store the IP address and port for the multicast. To tell clients what sort of data is in the stream, channels store stream description information. A channel can derive stream information from three sources: a stream description defined by the Real-Time Encoder and saved as an Active Streaming description file (.asd), a stream description stored in an Active Streaming format file (.asf), or from another NetShow channel. Channels are stored as NetShow channel files (.nsc) and must be located where clients can reach them across the network.

To direct clients to the channel file for a multicast, NetShow uses announcements. An announcement tells the client where to locate the channel file on the network. Announcements are stored as .asx files. After creating an announcement, you can distribute it to clients by means of the Web or e-mail, or by making it available on a network share. After a client receives an announcement and uses it to retrieve the multicast's channel information, the client has all the information needed to receive and render the multicast stream. Announcements provide flexibility. Because channel information is separate from the announcement, you can, for example, change channel information after you have announced a program without redistributing the announcement.

The second approach that NetShow takes to provide clients with the information necessary to receive a multicast is less complex, but also less flexible. For RTP audio multicasts and file transfers, all the information needed to receive the multicast is specified when you include the audio or file transfer client OCX in a Web page. The client OCX, Nsrtpaud.ocx or Nsfile.ocx, is then responsible for specifying which IP address and port to listen to, and, in the case of audio, which codec to use to render the stream. For more information on using these client OCXs in a Web page, see the NetShow Client SDK.

Whether multicasting Active Streaming data and using channels and announcements, or using the less complex RTP multicasting, NetShow uses programs to control the multicast and to organize multicast streams. A program contains one or more streams. When you start a program, NetShow starts multicasting the first stream in the program. When that stream ends, the next begins, and so on through all of the streams included in the program. You can specify the number of times a program repeats, and specify the length of time each stream runs.

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.