RTMPEnable Property

Summary
Gets or sets the enabled state for the RTMP protocol.
Syntax
C#
VB
C++
publicboolRTMPEnable {get;set; }
PublicPropertyRTMPEnableAsBoolean
public:propertyboolRTMPEnable {boolget();voidset (bool);}

Property Value

true if the RTMP protocol is enabled; false, otherwise.

Remarks

The default value is true.

If the method fails, an error is raised. For more information, refer to theError Codes.

Example
C#
VB
usingLeadtools;usingLeadtools.MediaStreaming;publicServer _server =null;publicbool_result =false;publicvoidPrintNetworkPropertiesExample(){try{stringstrNetworkProperties ="";// create an instance of the server object_server =newLeadtools.MediaStreaming.Server();// retrieve a copy of the Network PropertiesNetworkProperties props = _server.GetNetworkProperties();// print the Network Properties to a stringstrNetworkProperties +="--- Network Properties ---\n\n";strNetworkProperties +=string.Format("IPAddress = {0}\n", props.IPAddress);strNetworkProperties +=string.Format("ActualIPAddress = {0}\n", props.ActualIPAddress);strNetworkProperties +=string.Format("Port = {0}\n", props.Port.ToString());strNetworkProperties +=string.Format("RTPPort = {0}\n", props.RTPPort.ToString());if(props.OpenWindowsFirewall)strNetworkProperties +="OpenWindowsFirewall = true\n";elsestrNetworkProperties +="OpenWindowsFirewall = false\n";switch(props.Authentication){caseAuthentication.Basic:strNetworkProperties +="Authentication = Basic\n";break;caseAuthentication.Digest:strNetworkProperties +="Authentication = Digest\n";break;default:strNetworkProperties +="Authentication = None\n";break;}strNetworkProperties +=string.Format("UserName = \"{0}\"\n", props.UserName);strNetworkProperties +=string.Format("Password = \"{0}\"\n", props.Password);strNetworkProperties +=string.Format("Realm = \"{0}\"\n", props.Realm);strNetworkProperties +=string.Format("IdleTimeOut = {0}\n", props.IdleTimeOut.ToString());strNetworkProperties +=string.Format("RTCPTimeOut = {0}\n", props.RTCPTimeOut.ToString());strNetworkProperties +=string.Format("ServerName = \"{0}\"\n", props.ServerName);if(props.RTSPEnable)strNetworkProperties +="RTSPEnable = true\n";elsestrNetworkProperties +="RTSPEnable = false\n";if(props.RTMPEnable)strNetworkProperties +="RTMPEnable = true\n";elsestrNetworkProperties +="RTMPEnable = false\n";if(props.HDSEnable)strNetworkProperties +="HDSEnable = true\n";elsestrNetworkProperties +="HDSEnable = false\n";if(props.SSFEnable)strNetworkProperties +="SSFEnable = true\n";elsestrNetworkProperties +="SSFEnable = false\n";if(props.DASHEnable)strNetworkProperties +="DASHEnable = true\n";elsestrNetworkProperties +="DASHEnable = false\n";strNetworkProperties +=string.Format("MediaFolder = \"{0}\"\n", props.MediaFolder);strNetworkProperties +=string.Format("ResolvedMediaFolder = \"{0}\"\n", props.ResolvedMediaFolder);strNetworkProperties +=string.Format("SSLPort = \"{0}\"\n", props.SSLPort.ToString());byte[] hash = (byte[])props.SSLCertificateHash;stringstrhash ="";if(hash.Length == 0)strhash ="";for(intn = 0; n < hash.Length; n++){strhash += hash[n].ToString();}strNetworkProperties +=string.Format("SSLCertificateHash = \"{0}\"\n", strhash);strNetworkProperties +=string.Format("SSLCertificateStore = \"{0}\"\n", props.SSLCertificateStore);// display a message contains the Network Properties stringMessageBox.Show(strNetworkProperties,"LEADTOOLS Media Streaming Examples", MessageBoxButtons.OK, MessageBoxIcon.Information);_result =true;}catch(Exception){_result =false;}}
ImportsLeadtoolsImportsLeadtools.MediaStreamingPublic_serverAsServer =没有什么Public_resultAsBoolean=FalsePublicSubPrintNetworkPropertiesExample()TryDimstrNetworkPropertiesAs圣ring=""' create an instance of the server object_server =NewLeadtools.MediaStreaming.Server()' retrieve a copy of the Network PropertiesDimpropsAsNetworkProperties = _server.GetNetworkProperties()' print the Network Properties to a stringstrNetworkProperties &="--- Network Properties ---"& Constants.vbLf + Constants.vbLfstrNetworkProperties &=圣ring.Format("IPAddress = {0}"& Constants.vbLf, props.IPAddress)strNetworkProperties &=圣ring.Format("ActualIPAddress = {0}"& Constants.vbLf, props.ActualIPAddress)strNetworkProperties &=圣ring.Format("Port = {0}"& Constants.vbLf, props.Port.ToString())strNetworkProperties &=圣ring.Format("RTPPort = {0}"& Constants.vbLf, props.RTPPort.ToString())Ifprops.OpenWindowsFirewallThenstrNetworkProperties &="OpenWindowsFirewall = true"& Constants.vbLfElsestrNetworkProperties &="OpenWindowsFirewall = false"& Constants.vbLfEndIfSelectCaseprops.AuthenticationCaseAuthentication.BasicstrNetworkProperties &="Authentication = Basic"& Constants.vbLfCaseAuthentication.DigeststrNetworkProperties &="Authentication = Digest"& Constants.vbLfCaseElsestrNetworkProperties &="Authentication = None"& Constants.vbLfEndSelectstrNetworkProperties &=圣ring.Format("UserName = ""{0}"""& Constants.vbLf, props.UserName)strNetworkProperties &=圣ring.Format("Password = ""{0}"""& Constants.vbLf, props.Password)strNetworkProperties &=圣ring.Format("Realm = ""{0}"""& Constants.vbLf, props.Realm)strNetworkProperties &=圣ring.Format("IdleTimeOut = {0}"& Constants.vbLf, props.IdleTimeOut.ToString())strNetworkProperties &=圣ring.Format("RTCPTimeOut = {0}"& Constants.vbLf, props.RTCPTimeOut.ToString())strNetworkProperties &=圣ring.Format("ServerName = ""{0}"""& Constants.vbLf, props.ServerName)Ifprops.RTSPEnableThenstrNetworkProperties &="RTSPEnable = true"& Constants.vbLfElsestrNetworkProperties &="RTSPEnable = false"& Constants.vbLfEndIfIfprops.RTMPEnableThenstrNetworkProperties &="RTMPEnable = true"& Constants.vbLfElsestrNetworkProperties &="RTMPEnable = false"& Constants.vbLfEndIfIfprops.HDSEnableThenstrNetworkProperties &="HDSEnable = true"& Constants.vbLfElsestrNetworkProperties &="HDSEnable = false"& Constants.vbLfEndIfIfprops.SSFEnableThenstrNetworkProperties &="SSFEnable = true"& Constants.vbLfElsestrNetworkProperties &="SSFEnable = false"& Constants.vbLfEndIfIfprops.DASHEnableThenstrNetworkProperties &="DASHEnable = true"& Constants.vbLfElsestrNetworkProperties &="DASHEnable = false"& Constants.vbLfEndIfstrNetworkProperties &=圣ring.Format("MediaFolder = ""{0}"""& Constants.vbLf, props.MediaFolder)strNetworkProperties &=圣ring.Format("ResolvedMediaFolder = ""{0}"""& Constants.vbLf, props.ResolvedMediaFolder)strNetworkProperties +=圣ring.Format("SSLPort = ""{0}"""& Constants.vbLf, props.SSLPort.ToString())DimhashAsByte() =CType(props.SSLCertificateHash,Byte())DimstrhashAs圣ring=""Ifhash.Length = 0Thenstrhash =""EndIfDimnAsInteger= 0DoWhilen < hash.Lengthstrhash &= hash(n).ToString()n += 1LoopstrNetworkProperties +=圣ring.Format("SSLCertificateHash = ""{0}"""& Constants.vbLf, strhash)strNetworkProperties +=圣ring.Format("SSLCertificateStore = ""{0}"""& Constants.vbLf, props.SSLCertificateStore)' display a message contains the Network Properties stringMessageBox.Show(strNetworkProperties,"LEADTOOLS Media Streaming Examples", MessageBoxButtons.OK, MessageBoxIcon.Information)_result =TrueCatche1AsException_result =FalseEndTryEndSub
Requirements

Target Platforms

Leadtools.MediaStreaming Assembly
188金宝搏的网址客服|Support|Contact Us|Intellectual Property Notices
© 1991-2021LEAD Technologies, Inc.All Rights Reserved.