IWMSAdminUnicastSink Interface
The IWMSAdminUnicastSink interface is a data sink that you can use to send content to unicast clients. It is exposed by the WMS Unicast Data Sink plug-in.
In addition to the methods inherited from IDispatch, the IWMSAdminUnicastSink interface exposes the following methods.
Method |
Description |
---|---|
get_DataProtocols |
Retrieves a semicolon delimited list of the data protocols supported by the plug-in. |
get_DefaultPacketSize |
Retrieves a Boolean value indicating whether the network packet size should default to the packet size of the content being delivered. |
get_MaximumPacketSize |
Retrieves the maximum packet size that can be sent by the unicast data sink. |
get_MinClientPacketSize |
Retrieves the minimum value of the packet size that a client can request. |
get_OptimalPacketSize |
Retrieves the optimal packet size sent by the unicast data sink. |
get_TCPEnabled |
Retrieves a Boolean value indicating whether the unicast data sink can use TCP when selecting a streaming protocol. |
get_ThirdPartyStreamingEnabled |
Retrieves a Boolean value indicating whether UDP packets can be sent to an IP address that differs from the address of the client's TCP connection. |
get_UDPEnabled |
Retrieves a Boolean value indicating whether the unicast data sink can use UDP when selecting a streaming protocol. |
put_DefaultPacketSize |
Specifies a Boolean value indicating whether the network packet size should default to the packet size of the content being delivered. |
put_MaximumPacketSize |
Specifies the maximum packet size that can be sent by the unicast data sink. |
put_MinClientPacketSize |
Specifies the minimum value of the packet size that a client can request. |
put_OptimalPacketSize |
Specifies the optimal packet size sent by the unicast data sink. |
put_TCPEnabled |
Specifies a Boolean value indicating whether the unicast data sink can use TCP when selecting a streaming protocol. |
put_ThirdPartyStreamingEnabled |
Specifies a Boolean value indicating whether UDP packets can be sent to an IP address that differs from the address of the client's TCP connection. |
put_UDPEnabled |
Specifies a Boolean value indicating whether the unicast data sink can use UDP when selecting a streaming protocol. |
Example
The following example illustrates how to retrieve a pointer to an IWMSAdminUnicastSink interface
#include <windows.h>
#include <atlbase.h> // Includes CComVariant.
// To access system plug-in interfaces, the
// entire type library must be imported as shown.
#import "WMSServerTypeLib.dll" no_namespace named_guids \
raw_interfaces_only
// Declare variables and interfaces.
IWMSServer *pServer;
IWMSPlugins *pPlugins;
IWMSPlugin *pPlugin;
IDispatch *pDispatch;
IWMSAdminUnicastSink *pAdminUnicastSink;
HRESULT hr;
CComVariant varIndex;
// Initialize the COM library and retrieve a pointer
// to an IWMSServer interface.
hr = CoInitialize(NULL);
hr = CoCreateInstance(CLSID_WMSServer,
NULL,
CLSCTX_ALL,
IID_IWMSServer,
(void **)&pServer);
if (FAILED(hr)) goto EXIT;
// Retrieve a pointer to an IWMSPlugins interface
// containing unicast data sink plug-ins.
hr = pServer->get_UnicastDataSinks(&pPlugins);
if (FAILED(hr)) goto EXIT;
// Retrieve a pointer to the IWMSPlugin interface
// of the plug-in to be configured.
varIndex = "WMS Unicast Data Writer";
hr = pPlugins->get_Item(varIndex, &pPlugin);
if (FAILED(hr)) goto EXIT;
// Retrieve a pointer to the custom interface
// of the plug-in.
hr = pPlugin->get_CustomInterface(&pDispatch);
if (FAILED(hr)) goto EXIT;
// Query the specific administration interface
// for the plug-in.
hr = pDispatch->QueryInterface(IID_IWMSAdminUnicastSink,
(void **)&pAdminUnicastSink);
if (FAILED(hr)) goto EXIT;
EXIT:
// TODO: Release temporary COM objects and uninitialize COM.