Transmitting Files

File transmission downloads enhancement files to the broadcast clients. Before your application transmits the files, it must transmit a Data trigger. This Data trigger informs clients that a file is about to be transmitted and tells them which IP address and port to monitor in order to receive the file.

Typically, the Data trigger event is added to the stream during the authoring process and is automatically transmitted by your application as it processes the stream. If, however, your tool transmits streams from a variety of authoring sources, you may find it useful to add functionality to check for the accompanying data event.

An enhancement file often requires one or more additional files, such as image files, to display correctly. You can ensure that an enhancement file arrives with its dependency files by packaging them together into a cabinet file. The ipenhsnd type library provides an object, EnhCab, which your application can use to create cabinet files. For more information, see Creating a Cabinet File.

Your can transmit files using ipsend.SendEvent or ipsend.SendFTSFile. These methods broadcast files using Microsoft® NetShow™ File Transfer Service (FTS). To limit the bandwidth FTS uses to transmit files, set a value for ipsend.Throttle.

To use SendEvent, pass in the event object you want to transmit. The following example illustrates how to transmit the event stored in the EnhEvent object, e.

isend.SendEvent e
 

The following examples demonstrate how to transmit a file using ipsend.SendFTSFile.

'Transmit the file stored in event e
'(For FTS events, EnhEvent.Name contains the 
'source file name.)
isend.SendFTSFile e.Name
 
'Transmit a file using hard-coded data
isend.SendFTSFile "Art\Gallery.htm"