IWMSCPPluginAdmin.Port (C#)
.gif)
| Previous | Next |
IWMSCPPluginAdmin.Port (C#)
The Port property specifies and retrieves the port number used by the protocol.
Syntax
IWMSCPPluginAdmin .Port = int; int = IWMSCPPluginAdmin.Port;
Property Value
int containing the port number.
Remarks
If you are behind a firewall, you must explicitly open an appropriate port for each protocol you want to use. The following table identifies the incoming ports you must open for each protocol.
- Note
Windows Media Player 9Series and later does not use the MMS protocol. - The MMS protocol is not supported in Windows Server
2008 operating systems.
| Protocol | Port |
| MMST | TCP port 1755 |
| MMSU | UDP port 1755 |
| RTSPT | TCP port 554 |
| RTSPU | UDP port 5005 |
| HTTP | TCP port 80 |
You must also open the outgoing UDP ports 1024-5000 to send data to Windows Media Player and other clients.
Example Code
using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;
// Declare variables.
WMSServer Server;
IWMSPlugin Plugin;
IWMSCPPluginAdmin CPAdmin;
try {
// Create a new WMSServer object.
Server = new WMSServerClass();
// Retrieve the plug-in to be configured.
Plugin = Server.ControlProtocols[
"WMS RTSP Server Control Protocol"];
// Retrieve the custom interface of the plug-in.
CPAdmin =
(IWMSCPPluginAdmin)Plugin.CustomInterface;
// Bind the plug-in to a specific port.
CPAdmin.Port = 31667;
}
catch (COMException comExc) {
// TODO: Handle COM exceptions.
}
catch (Exception e) {
// TODO: Handle exceptions.
}
Requirements
Reference: Add a reference to Microsoft.WindowsMediaServices.
Namespace: Microsoft.WindowsMediaServices.Interop.
Assembly: Microsoft.WindowsMediaServices.dll.
Library: WMSServerTypeLib.dll.
Platform: Windows Server 2003 family, Windows Server 2008 family.
See Also
| Previous | Next |