c#
VB
c++
公共intRTCPTimeOut {得到;集;}
公共财产RTCPTimeOut作为整数
一个值代表的最长时间,以毫秒为单位,等待服务器的服务器连接。
使用Leadtools;
使用Leadtools.MediaStreaming;
公共服务器_server =零;
公共bool_result =假;
公共无效PrintNetworkPropertiesExample ()
{
试一试
{
字符串strNetworkProperties =”“;
/ /创建一个服务器对象的实例
_server =新Leadtools.MediaStreaming.Server ();
/ /检索网络属性的一个副本
NetworkProperties道具= _server.GetNetworkProperties ();
/ /打印网络属性字符串
strNetworkProperties + =”——网络属性——\ n \ n”;
strNetworkProperties + =字符串.Format (“IPAddress = {0} \ n”,props.IPAddress);
strNetworkProperties + =字符串.Format (“ActualIPAddress = {0} \ n”,props.ActualIPAddress);
strNetworkProperties + =字符串.Format (“港口= {0}\ n”props.Port.ToString ());
strNetworkProperties + =字符串.Format (“RTPPort = {0} \ n”props.RTPPort.ToString ());
如果(props.OpenWindowsFirewall)
strNetworkProperties + =“OpenWindowsFirewall = true \ n”;
其他的
strNetworkProperties + =“OpenWindowsFirewall = false \ n”;
开关(props.Authentication)
{
情况下Authentication.Basic:
strNetworkProperties + =“身份验证=基本\ n”;
打破;
情况下Authentication.Digest:
strNetworkProperties + =“身份验证=消化\ n”;
打破;
默认的:
strNetworkProperties + =“身份验证=没有\ n”;
打破;
}
strNetworkProperties + =字符串.Format (“用户名= \”{0}\“\ n”,props.UserName);
strNetworkProperties + =字符串.Format (“密码= \”{0}\“\ n”,props.Password);
strNetworkProperties + =字符串.Format (“领域= \”{0}\“\ n”,props.Realm);
strNetworkProperties + =字符串.Format (“IdleTimeOut = {0} \ n”props.IdleTimeOut.ToString ());
strNetworkProperties + =字符串.Format (“RTCPTimeOut = {0} \ n”props.RTCPTimeOut.ToString ());
strNetworkProperties + =字符串.Format (“ServerName = \”{0} \“\ n”,props.ServerName);
如果(props.RTSPEnable)
strNetworkProperties + =“RTSPEnable = true \ n”;
其他的
strNetworkProperties + =“RTSPEnable = false \ n”;
如果(props.RTMPEnable)
strNetworkProperties + =“RTMPEnable = true \ n”;
其他的
strNetworkProperties + =“RTMPEnable = false \ n”;
如果(props.HDSEnable)
strNetworkProperties + =“HDSEnable = true \ n”;
其他的
strNetworkProperties + =“HDSEnable = false \ n”;
如果(props.SSFEnable)
strNetworkProperties + =“SSFEnable = true \ n”;
其他的
strNetworkProperties + =“SSFEnable = false \ n”;
如果(props.DASHEnable)
strNetworkProperties + =“DASHEnable = true \ n”;
其他的
strNetworkProperties + =“DASHEnable = false \ n”;
strNetworkProperties + =字符串.Format (“MediaFolder = \”{0} \“\ n”,props.MediaFolder);
strNetworkProperties + =字符串.Format (“ResolvedMediaFolder = \”{0} \“\ n”,props.ResolvedMediaFolder);
strNetworkProperties + =字符串.Format (“SSLPort = \”{0} \“\ n”props.SSLPort.ToString ());
字节[]散列= (字节[])props.SSLCertificateHash;
字符串strhash =”“;
如果(散列。长度= = 0)
strhash =<空>”;
为(intn = 0;n < hash.Length;n + +)
{
哈希[n] .ToString strhash + = ();
}
strNetworkProperties + =字符串.Format (“SSLCertificateHash = \”{0} \“\ n”,strhash);
strNetworkProperties + =字符串.Format (“SSLCertificateStore = \”{0} \“\ n”,props.SSLCertificateStore);
/ /显示一个消息包含网络属性字符串
MessageBox.Show (strNetworkProperties“LEADTOOLS流媒体的例子”,MessageBoxButtons。好的,MessageBoxIcon.Information);
_result =真正的;
}
抓(异常)
{
_result =假;
}
}
进口Leadtools
进口Leadtools.MediaStreaming
公共_server作为服务器=没有什么
公共_result作为布尔=假
公共子PrintNetworkPropertiesExample ()
试一试
昏暗的strNetworkProperties作为字符串=”“
“创建服务器对象的一个实例
_server =新Leadtools.MediaStreaming.Server ()
“检索网络属性的一个副本
昏暗的道具作为NetworkProperties = _server.GetNetworkProperties ()
打印网络属性字符串
strNetworkProperties & =“网络属性- - - - - - - - - - - -”& Constants.vbLf+ Constants.vbLf
strNetworkProperties & =字符串.Format (“IPAddress = {0}”& Constants.vbLf, props.IPAddress)
strNetworkProperties & =字符串.Format (“ActualIPAddress = {0}”& Constants.vbLf, props.ActualIPAddress)
strNetworkProperties & =字符串.Format (“港口= {0}”& Constants.vbLf, props.Port.ToString())
strNetworkProperties & =字符串.Format (“RTPPort = {0}”& Constants.vbLf, props.RTPPort.ToString())
如果props.OpenWindowsFirewall然后
strNetworkProperties & =“OpenWindowsFirewall = true”& Constants.vbLf
其他的
strNetworkProperties & =“OpenWindowsFirewall = false”& Constants.vbLf
结束如果
选择情况下props.Authentication
情况下Authentication.Basic
strNetworkProperties & =“身份验证=基本”& Constants.vbLf
情况下Authentication.Digest
strNetworkProperties & =“身份验证=消化”& Constants.vbLf
情况下其他的
strNetworkProperties & =“身份验证=没有”& Constants.vbLf
结束选择
strNetworkProperties & =字符串.Format ("用户名= "“{0}”“”& Constants.vbLf, props.UserName)
strNetworkProperties & =字符串.Format (“{0}”“密码=”& Constants.vbLf, props.Password)
strNetworkProperties & =字符串.Format (“领域=”“{0}”“& Constants.vbLf, props.Realm)
strNetworkProperties & =字符串.Format (“IdleTimeOut = {0}”& Constants.vbLf, props.IdleTimeOut.ToString())
strNetworkProperties & =字符串.Format (“RTCPTimeOut = {0}”& Constants.vbLf, props.RTCPTimeOut.ToString())
strNetworkProperties & =字符串.Format (“{0}”“ServerName =”& Constants.vbLf, props.ServerName)
如果props.RTSPEnable然后
strNetworkProperties & =“RTSPEnable = true”& Constants.vbLf
其他的
strNetworkProperties & =“RTSPEnable = false”& Constants.vbLf
结束如果
如果props.RTMPEnable然后
strNetworkProperties & =“RTMPEnable = true”& Constants.vbLf
其他的
strNetworkProperties & =“RTMPEnable = false”& Constants.vbLf
结束如果
如果props.HDSEnable然后
strNetworkProperties & =“HDSEnable = true”& Constants.vbLf
其他的
strNetworkProperties & =“HDSEnable = false”& Constants.vbLf
结束如果
如果props.SSFEnable然后
strNetworkProperties & =“SSFEnable = true”& Constants.vbLf
其他的
strNetworkProperties & =“SSFEnable = false”& Constants.vbLf
结束如果
如果props.DASHEnable然后
strNetworkProperties & =“DASHEnable = true”& Constants.vbLf
其他的
strNetworkProperties & =“DASHEnable = false”& Constants.vbLf
结束如果
strNetworkProperties & =字符串.Format (“{0}”“MediaFolder =”& Constants.vbLf, props.MediaFolder)
strNetworkProperties & =字符串.Format (“{0}”“ResolvedMediaFolder =”& Constants.vbLf, props.ResolvedMediaFolder)
strNetworkProperties + =字符串.Format (“{0}”“SSLPort =”& Constants.vbLf, props.SSLPort.ToString())
昏暗的哈希作为字节()=CType(props.SSLCertificateHash字节())
昏暗的strhash作为字符串=”“
如果散列。长度= 0然后
strhash =<空>”
结束如果
昏暗的n作为整数= 0
做而n < hash.Length
哈希(n) .ToString strhash & = ()
n + = 1
循环
strNetworkProperties + =字符串.Format (“{0}”“SSLCertificateHash =”& Constants.vbLf, strhash)
strNetworkProperties + =字符串.Format (“{0}”“SSLCertificateStore =”& Constants.vbLf, props.SSLCertificateStore)
显示一条消息包含网络属性字符串
MessageBox.Show (strNetworkProperties“LEADTOOLS流媒体的例子”,MessageBoxButtons。好的,MessageBoxIcon.Information)
_result =真正的
抓e1作为异常
_result =假
结束试一试
结束子
帮助收藏
光栅net|C API|c++类库|HTML5 JavaScript
文档net|C API|c++类库|HTML5 JavaScript
医疗net|C API|c++类库|HTML5 JavaScript
医疗Web查看器net
188宝金博怎么下载
支持的平台上
net, Java, Android和iOS / macOS组件
C / c++类库的API
HTML5 JavaScript库
你的邮件已经发送到支持!有人应该联系!如果你的问题是紧急请回到聊天。
聊天时间:
周一——周五,上午6点等
谢谢你的反馈!
请填写表单重新开始一个新的聊天。
所有代理目前离线。
聊天时间:
周一-周五
早上8:30 - 6点
联系我们请填写这张表格,我们将通过电子邮件联系你。