ProtocolSubStatus财产

总结
检索特定于协议的子状态错误码。
语法
c#
VB
c++
[DispIdAttribute (21)]公共intProtocolSubStatus {得到;}
只读的财产ProtocolSubStatus作为整数
财产intProtocolSubStatus {intget ();

属性值

表示特定于协议的子状态错误码的整数。

讲话

如果整数为零,则表示没有其他错误信息可用。目前所有协议的子状态返回零。这可能会在工具箱的未来版本中改变。

如果该方法失败,将引发一个错误。有关更多信息,请参阅错误代码

例子
c#
VB
使用Leadtools;使用Leadtools.MediaStreaming;枚举W3CLOG= 0 x00000001日期,时间= 0 x00000002,c_ip = 0 x00000004,cs_username = 0 x00000008,s_sitename = 0 x00000010,s_computername = 0 x00000020,s_ip = 0 x00000040,s_port = 0 x00000080,cs_method = 0 x00000100,cs_uri_stem = 0 x00000200,cs_uri_query = 0 x00000400,sc_status = 0 x00000800,sc_win32_status = 0 x00001000,sc_bytes = 0 x00002000,cs_bytes = 0 x00004000,time_taken = 0 x00008000,cs_version = 0 x00010000,cs_host = 0 x00020000,cs_user_agent = 0 x00040000,cs_cookie = 0 x00080000,cs_referer = 0 x00100000,sc_substatus = 0 x00200000,};公共CW3CLogHandler: ILtmsLogHandler保龄球m_enable;intm_fields;保龄球m_localtime;DateTime m_dtfile;字符串m_software;字符串m_folder;字符串m_prefix;StreamWriter m_sw;公共CW3CLogHandler (字符串前缀,字符串软件保龄球启用,字符串文件夹,int字段,保龄球本地时间)m_prefix =前缀;m_software =软件;m_enable =启用;m_folder =文件夹;m_fields =字段;m_localtime =作用;~ CW3CLogHandler ()无效WriteString (字符串str)m_sw.Write (str);DateTime取得时间(dTime)dt = DateTime. fromoadate (dTime);如果(m_localtime)返回dt.ToLocalTime ();返回dt;字符串GetLogPath (时间戳)DateTime dt = GetTime(timestamp);字符串strFullPath;试一试PathResolver解析器=PathResolver ();strFullPath = resolver.Resolve (m_folder);返回""strFullPath + =“\ \”;strFullPath + = m_prefix;如果(m_localtime !)strFullPath + = dt。ToString (“y-MM-dd-HH-mm-ss”).替换(“-”"") +“UTC.log”其他的strFullPath + = dt。ToString (“y-MM-dd-HH-mm-ss”).替换(“-”"") +. log”返回strFullPath;公共无效LoadConfig服务器(服务器)保龄球使= m_enable;保龄球本地时间= m_localtime;字符串文件夹= m_folder;int字段= m_fields;保龄球肮脏的=AppProps = server.GetApplicationProperties();试一试使= AppProps。GetBoolean (“LogEnable”);AppProps。AddBoolean (“LogEnable”使);肮脏的=真正的试一试本地时间= AppProps。GetBoolean (“LogLocalTime”);AppProps。AddBoolean (“LogLocalTime”、作用);肮脏的=真正的试一试= AppProps文件夹。GetString (“LogFolder”);AppProps。AddString (“LogFolder”、文件夹);肮脏的=真正的试一试= AppProps字段。GetInteger (“LogFields”);AppProps。AddInteger (“LogFields”、字段);肮脏的=真正的如果(脏的)server.SetApplicationProperties (AppProps);//如果有任何变化,那么我们需要关闭当前文件如果(!启用& & (字符串.Compare (m_folder文件夹,真正的|| fields != m_fields || m_localtime != localtime如果(m_sw ! =m_sw.Close ();m_folder =文件夹;m_localtime =作用;m_enable =启用;m_fields =字段;保龄球CreateLog (时间戳)如果(m_sw ! =m_sw.Close ();如果(m_enable !)返回试一试m_sw = File.CreateText (GetLogPath(时间戳));返回m_dtfile =取得时间(时间戳);字符串年代;s =“#软件:”+ m_software +“\ r \ n”WriteString(年代);WriteString (“#版本:1.0 \ r \ n”);DateTime dt = GetTime(timestamp);s =" #日期:"+ dt。ToString (“yyyy-MM-dd HH: mm: ss”) +“\ r \ n”WriteString(年代);s =“#字段:“如果((m_fields & (int) W3CLOG.date) = = (intW3CLOG.date)s + =“日期”如果((m_fields & (int) W3CLOG.time) = = (intW3CLOG.time)s + =“时间”如果((m_fields & (int) W3CLOG.s_sitename) = = (intW3CLOG.s_sitename)s + =“s-sitename”如果((m_fields & (int) W3CLOG.s_computername) = = (intW3CLOG.s_computername)s + =“s-computername”如果((m_fields & (int) W3CLOG.s_ip) = = (intW3CLOG.s_ip)s + =“s-ip”如果((m_fields & (int) W3CLOG.cs_method) = = (intW3CLOG.cs_method)s + =“cs方法”如果((m_fields & (int) W3CLOG.cs_uri_stem) = = (intW3CLOG.cs_uri_stem)s + =“cs-uri-stem”如果((m_fields & (int) W3CLOG.cs_uri_query) = = (intW3CLOG.cs_uri_query)s + =“cs-uri-query”如果((m_fields & (int) W3CLOG.s_port) = = (intW3CLOG.s_port)s + =“s-port”如果((m_fields & (int) W3CLOG.cs_username) = = (intW3CLOG.cs_username)s + =“cs-username”如果((m_fields & (int) W3CLOG.c_ip) = = (intW3CLOG.c_ip)s + =“c-ip”如果((m_fields & (int) W3CLOG.cs_version) = = (intW3CLOG.cs_version)s + =“cs-version”如果((m_fields & (int) W3CLOG.cs_user_agent) = = (intW3CLOG.cs_user_agent)s + =“cs(用户代理)”如果((m_fields & (int) W3CLOG.cs_cookie) = = (intW3CLOG.cs_cookie)s + =“cs(饼干)”如果((m_fields & (int) W3CLOG.cs_referer) = = (intW3CLOG.cs_referer)s + =“cs(推荐人)”如果((m_fields & (int) W3CLOG.cs_host) = = (intW3CLOG.cs_host)s + =“cs-host”如果((m_fields & (int) W3CLOG.sc_status) = = (intW3CLOG.sc_status)s + =“sc-status”如果((m_fields & (int) W3CLOG.sc_substatus) = = (intW3CLOG.sc_substatus)s + =“sc-substatus”如果((m_fields & (int) W3CLOG.sc_win32_status) = = (intW3CLOG.sc_win32_status)s + =“sc-win32-status”如果((m_fields & (int) W3CLOG.sc_bytes) = = (intW3CLOG.sc_bytes)s + =“sc-bytes”如果((m_fields & (int) W3CLOG.cs_bytes) = = (intW3CLOG.cs_bytes)s + =“cs-bytes”如果((m_fields & (int) W3CLOG.time_taken) = = (intW3CLOG.time_taken)s + =“时间”s + =“\ r \ n”WriteString(年代);m_sw.Flush ();返回真正的字符串逃避(字符串s)字符串t =""foreach字符cs)如果(!字符.IsControl (c) & & !字符.IsWhiteSpace (c))t + = c;其他的t + =“+”返回t;公共无效InitializeLog (时间戳)CreateLog(时间戳);公共无效TerminateLog ()如果(m_sw ! =m_sw.Close ();公共无效LogInformation (ILtmsLogInformation信息)字符串s =""如果(m_enable !)返回//检查我们是否需要滚动到一个新文件DateTime dt = GetTime(info.TimeStamp);如果(m_sw = =| | dt。一天!= m_dtfile.Day || dt.Month != m_dtfile.Month || dt.Year != m_dtfile.Year)如果(! CreateLog (info.TimeStamp))返回如果((m_fields & (int) W3CLOG.date) = = (intW3CLOG.date)DateTime dt = GetTime(info.TimeStamp);如果(s.Length > 0)s + =”“+ = dt。ToString (“yyyy-MM-dd”);如果((m_fields & (int) W3CLOG.time) = = (intW3CLOG.time)DateTime dt = GetTime(info.TimeStamp);如果(s.Length > 0)s + =”“+ = dt。ToString (“HH: mm: ss”);如果((m_fields & (int) W3CLOG.s_sitename) = = (intW3CLOG.s_sitename)字符串str = info.SiteName;如果(s.Length > 0)s + =”“如果(str.Length = = 0)s + =“-”其他的s + =逃脱(str);如果((m_fields & (int) W3CLOG.s_computername) = = (intW3CLOG.s_computername)字符串str = info.ComputerName;如果(s.Length > 0)s + =”“如果(str.Length = = 0)s + =“-”其他的s + =逃脱(str);如果((m_fields & (int) W3CLOG.s_ip) = = (intW3CLOG.s_ip)字符串str = info.ServerIP;如果(s.Length > 0)s + =”“如果(str.Length = = 0)s + =“-”其他的s + =逃脱(str);如果((m_fields & (int) W3CLOG.cs_method) = = (intW3CLOG.cs_method)字符串str = info.Method;如果(s.Length > 0)s + =”“如果(str.Length = = 0)s + =“-”其他的s + =逃脱(str);如果((m_fields & (int) W3CLOG.cs_uri_stem) = = (intW3CLOG.cs_uri_stem)字符串str = info.URIStem;如果(s.Length > 0)s + =”“如果(str.Length = = 0)s + =“-”其他的s + =逃脱(str);如果((m_fields & (int) W3CLOG.cs_uri_query) = = (intW3CLOG.cs_uri_query)字符串str = info.URIQuery;如果(s.Length > 0)s + =”“如果(str.Length = = 0)s + =“-”其他的s + =逃脱(str);如果((m_fields & (int) W3CLOG.s_port) = = (intW3CLOG.s_port)intn = info.ServerPort;如果(s.Length > 0)s + =”“s + = n.ToString ();如果((m_fields & (int) W3CLOG.cs_username) = = (intW3CLOG.cs_username)字符串str = info.UserName;如果(s.Length > 0)s + =”“如果(str.Length = = 0)s + =“-”其他的s + =逃脱(str);如果((m_fields & (int) W3CLOG.c_ip) = = (intW3CLOG.c_ip)字符串str = info.ClientIP;如果(s.Length > 0)s + =”“如果(str.Length = = 0)s + =“-”其他的s + =逃脱(str);如果((m_fields & (int) W3CLOG.cs_version) = = (intW3CLOG.cs_version)字符串str = info.ProtocolVersion;如果(s.Length > 0)s + =”“如果(str.Length = = 0)s + =“-”其他的s + =逃脱(str);如果((m_fields & (int) W3CLOG.cs_user_agent) = = (intW3CLOG.cs_user_agent)字符串str = info.UserAgent;如果(s.Length > 0)s + =”“如果(str.Length = = 0)s + =“-”其他的s + =逃脱(str);如果((m_fields & (int) W3CLOG.cs_cookie) = = (intW3CLOG.cs_cookie)字符串str = info.Cookie;如果(s.Length > 0)s + =”“如果(str.Length = = 0)s + =“-”其他的s + =逃脱(str);如果((m_fields & (int) W3CLOG.cs_referer) = = (intW3CLOG.cs_referer)字符串str = info.Referrer;如果(s.Length > 0)s + =”“如果(str.Length = = 0)s + =“-”其他的s + =逃脱(str);如果((m_fields & (int) W3CLOG.cs_host) = = (intW3CLOG.cs_host)字符串str = info.Host;如果(s.Length > 0)s + =”“如果(str.Length = = 0)s + =“-”其他的s + =逃脱(str);如果((m_fields & (int) W3CLOG.sc_status) = = (intW3CLOG.sc_status)intn = info.Status;如果(s.Length > 0)s + =”“s + = n.ToString ();如果((m_fields & (int) W3CLOG.sc_substatus) = = (intW3CLOG.sc_substatus)intn = info.ProtocolSubStatus;如果(s.Length > 0)s + =”“s + = n.ToString ();如果((m_fields & (int) W3CLOG.sc_win32_status) = = (intW3CLOG.sc_win32_status)intn = info.Win32Status;如果(s.Length > 0)s + =”“s + = n.ToString ();如果((m_fields & (int) W3CLOG.sc_bytes) = = (intW3CLOG.sc_bytes)intn = info.BytesSent;如果(s.Length > 0)s + =”“如果(n < 0)s + =“-”其他的s + = n.ToString ();如果((m_fields & (int) W3CLOG.cs_bytes) = = (intW3CLOG.cs_bytes)intn = info.BytesReceived;如果(s.Length > 0)s + =”“如果(n < 0)s + =“-”其他的s + = n.ToString ();如果((m_fields & (int) W3CLOG.time_taken) = = (intW3CLOG.time_taken)intn = info.TimeTaken;如果(s.Length > 0)s + =”“如果(n < 0)s + =“-”其他的s + = n.ToString ();s + =“\ r \ n”WriteString(年代);m_sw.Flush ();公共服务器_server =公共保龄球_result =公共无效W3CLogHandlerExample ()试一试国家enumState;CW3CLogHandler _loghandler;//创建一个服务器对象的实例_server =Leadtools.MediaStreaming.Server ();//创建日志处理程序_loghandler =CW3CLogHandler (“ltmsServer_”“LEADTOOLS媒体流媒体服务器”真正的“% ltmsLogFolder %”0,);//设置日志处理程序_server。ILogHandler = _loghandler;//对比我们刚刚设置的接口ILtmsLogHandler ihandler =ihandler = _server.ILogHandler;如果(ihandler ! = (ILtmsLogHandler) _loghandler)_result =返回//加载可执行文件夹下的config子文件夹中的配置文件//或将此部分注释掉以使用服务器的默认设置运行_server。ImportConfigFile (“% ltmsConfigFolder % \ \ LeadtoolsMediaStreamingServer.xml”);//启动服务器_server.Start ();//为演示目的确认运行状态enumState = _server.State;如果(enumState = = State.Started)//显示服务器正在运行的消息并等待OK对话框。显示(服务器已启动。按OK停止。”“LEADTOOLS媒体流示例”, MessageBoxButtons。好的,MessageBoxIcon.Information);//停止服务器_server.Stop ();//删除日志处理程序_server。ILogHandler =_result =真正的(异常)_result =
进口Leadtools进口Leadtools。MediaStreaming私人枚举W3CLOG日期] = h1时间= h2c_ip = h4cs_username = h8s_sitename = h10s_computername = 3s_ip = &H40s_port = &H80cs_method = &H100cs_uri_stem = &H200cs_uri_query = &H400sc_status = &H800sc_win32_status = &H1000sc_bytes = &H2000cs_bytes = &H4000time_taken = &H8000cs_version = &H10000cs_host = &H20000cs_user_agent = &H40000cs_cookie = &H80000cs_referer = &H100000sc_substatus = &H200000结束枚举公共CW3CLogHandler:实现了ILtmsLogHandler私人m_enable作为布尔私人m_fields作为整数私人m_localtime作为布尔私人m_dtfile作为DateTime私人m_software作为字符串私人m_folder作为字符串私人m_prefix作为字符串私人m_sw作为StreamWriter公共按值传递前缀作为字符串按值传递软件作为字符串按值传递启用作为布尔按值传递文件夹作为字符串按值传递字段作为整数按值传递本地时间作为布尔m_prefix =前缀m_software =软件m_enable =启用m_folder =文件夹m_fields =字段m_localtime =作用结束受保护的覆盖Finalize ()结束私人WriteString (按值传递str作为字符串m_sw.Write (str)结束私人函数取得时间(按值传递dTime作为作为DateTime昏暗的dt作为DateTime = DateTime.FromOADate (dTime)如果m_localtime然后返回dt.ToLocalTime ()结束如果返回dt结束函数私人函数GetLogPath (按值传递时间戳作为作为字符串昏暗的dt作为DateTime =取得时间(时间戳)昏暗的strFullPath作为字符串试一试昏暗的解析器作为PathResolver =PathResolver ()strFullPath = resolver.Resolve (m_folder)返回""结束试一试strFullPath & =“\”strFullPath & = m_prefix如果m_localtime)然后strFullPath & = dt。ToString (“y-MM-dd-HH-mm-ss”).替换(“-”"") &“UTC.log”其他的strFullPath & = dt。ToString (“y-MM-dd-HH-mm-ss”).替换(“-”"") &. log”结束如果返回strFullPath结束函数公共LoadConfig (按值传递服务器作为服务器)昏暗的启用作为布尔= m_enable昏暗的本地时间作为布尔= m_localtime昏暗的文件夹作为字符串= m_folder昏暗的字段作为整数= m_fields昏暗的作为布尔昏暗的AppProps作为ApplicationProperties = server.GetApplicationProperties ()试一试使= AppProps。GetBoolean (“LogEnable”AppProps。AddBoolean (“LogEnable”启用)肮脏的=真正的结束试一试试一试本地时间= AppProps。GetBoolean (“LogLocalTime”AppProps。AddBoolean (“LogLocalTime”、作用)肮脏的=真正的结束试一试试一试= AppProps文件夹。GetString (“LogFolder”AppProps。AddString (“LogFolder”文件夹)肮脏的=真正的结束试一试试一试= AppProps字段。GetInteger (“LogFields”AppProps。AddInteger (“LogFields”、字段)肮脏的=真正的结束试一试如果然后server.SetApplicationProperties (AppProps)结束如果’如果有任何变化,那么我们需要关闭当前文件如果启用)需要说明字符串.Compare (m_folder文件夹,真正的) < > 0)OrElse<字段> m_fieldsOrElsem_localtime < >本地时间然后如果m_sw没有什么然后m_sw.Close ()结束如果结束如果m_folder =文件夹m_localtime =作用m_enable =启用m_fields =字段结束私人函数CreateLog (按值传递时间戳作为作为布尔如果m_sw没有什么然后m_sw.Close ()结束如果如果m_enable)然后返回结束如果试一试m_sw = File.CreateText (GetLogPath(时间戳)返回结束试一试m_dtfile =取得时间(时间戳)昏暗的年代作为字符串s =“#软件:”& m_software & Constants.vbCrLfWriteString (s)WriteString (“#版本:1.0”& Constants.vbCrLf)昏暗的dt作为DateTime =取得时间(时间戳)s =" #日期:"& dt。ToString (“yyyy-MM-dd HH: mm: ss”) & Constants.vbCrLfWriteString (s)s =“#字段:“如果(m_fieldsCInt(W3CLOG。日期)) =CInt(W3CLOG。日期然后s & =“日期”结束如果如果(m_fieldsCInt(W3CLOG.time)) =CInt(W3CLOG.time)然后s & =“时间”结束如果如果(m_fieldsCInt(W3CLOG.s_sitename)) =CInt(W3CLOG.s_sitename)然后s & =“s-sitename”结束如果如果(m_fieldsCInt(W3CLOG.s_computername)) =CInt(W3CLOG.s_computername)然后s & =“s-computername”结束如果如果(m_fieldsCInt(W3CLOG.s_ip)) =CInt(W3CLOG.s_ip)然后s & =“s-ip”结束如果如果(m_fieldsCInt(W3CLOG.cs_method)) =CInt(W3CLOG.cs_method)然后s & =“cs方法”结束如果如果(m_fieldsCInt(W3CLOG.cs_uri_stem)) =CInt(W3CLOG.cs_uri_stem)然后s & =“cs-uri-stem”结束如果如果(m_fieldsCInt(W3CLOG.cs_uri_query)) =CInt(W3CLOG.cs_uri_query)然后s & =“cs-uri-query”结束如果如果(m_fieldsCInt(W3CLOG.s_port)) =CInt(W3CLOG.s_port)然后s & =“s-port”结束如果如果(m_fieldsCInt(W3CLOG.cs_username)) =CInt(W3CLOG.cs_username)然后s & =“cs-username”结束如果如果(m_fieldsCInt(W3CLOG.c_ip)) =CInt(W3CLOG.c_ip)然后s & =“c-ip”结束如果如果(m_fieldsCInt(W3CLOG.cs_version)) =CInt(W3CLOG.cs_version)然后s & =“cs-version”结束如果如果(m_fieldsCInt(W3CLOG.cs_user_agent)) =CInt(W3CLOG.cs_user_agent)然后s & =“cs(用户代理)”结束如果如果(m_fieldsCInt(W3CLOG.cs_cookie)) =CInt(W3CLOG.cs_cookie)然后s & =“cs(饼干)”结束如果如果(m_fieldsCInt(W3CLOG.cs_referer)) =CInt(W3CLOG.cs_referer)然后s & =“cs(推荐人)”结束如果如果(m_fieldsCInt(W3CLOG.cs_host)) =CInt(W3CLOG.cs_host)然后s & =“cs-host”结束如果如果(m_fieldsCInt(W3CLOG.sc_status)) =CInt(W3CLOG.sc_status)然后s & =“sc-status”结束如果如果(m_fieldsCInt(W3CLOG.sc_substatus)) =CInt(W3CLOG.sc_substatus)然后s & =“sc-substatus”结束如果如果(m_fieldsCInt(W3CLOG.sc_win32_status)) =CInt(W3CLOG.sc_win32_status)然后s & =“sc-win32-status”结束如果如果(m_fieldsCInt(W3CLOG.sc_bytes)) =CInt(W3CLOG.sc_bytes)然后s & =“sc-bytes”结束如果如果(m_fieldsCInt(W3CLOG.cs_bytes)) =CInt(W3CLOG.cs_bytes)然后s & =“cs-bytes”结束如果如果(m_fieldsCInt(W3CLOG.time_taken)) =CInt(W3CLOG.time_taken)然后s & =“时间”结束如果s & = Constants.vbCrLfWriteString (s)m_sw.Flush ()返回真正的结束函数私人函数逃避(按值传递年代作为字符串作为字符串昏暗的t作为字符串""每一个c作为字符年代如果字符.IsControl (c))需要说明字符.IsWhiteSpace (c))然后t & = c其他的t & =“+”结束如果下一个c返回t结束函数公共InitializeLog (按值传递时间戳作为实现了ILtmsLogHandler。InitializeLogCreateLog(时间戳)结束公共TerminateLog ()实现了ILtmsLogHandler。TerminateLog如果m_sw没有什么然后m_sw.Close ()结束如果结束公共LogInformation (按值传递信息作为ILtmsLogInformation)实现了ILtmsLogHandler。LogInformation昏暗的年代作为字符串""如果m_enable)然后返回结束如果检查我们是否需要滚动到一个新文件昏暗的dt作为DateTime =取得时间(info.TimeStamp)如果m_sw没有什么OrElsedt。一天<> m_dtfile.DayOrElsedt。月< > m_dtfile。月OrElsedt。年的< > m_dtfile。一年然后如果CreateLog (info.TimeStamp))然后返回结束如果结束如果如果(m_fieldsCInt(W3CLOG。日期)) =CInt(W3CLOG。日期然后昏暗的dtDate作为DateTime =取得时间(info.TimeStamp)如果s.Length > 0然后s & =”“结束如果& = dtDate。ToString (“yyyy-MM-dd”结束如果如果(m_fieldsCInt(W3CLOG.time)) =CInt(W3CLOG.time)然后昏暗的dtTime作为DateTime =取得时间(info.TimeStamp)如果s.Length > 0然后s & =”“结束如果& = dtTime。ToString (“HH: mm: ss”结束如果如果(m_fieldsCInt(W3CLOG.s_sitename)) =CInt(W3CLOG.s_sitename)然后昏暗的str作为字符串= info。SiteName如果s.Length > 0然后s & =”“结束如果如果str.Length = 0然后s & =“-”其他的& =逃脱(str)结束如果结束如果如果(m_fieldsCInt(W3CLOG.s_computername)) =CInt(W3CLOG.s_computername)然后昏暗的str作为字符串= info。ComputerName如果s.Length > 0然后s & =”“结束如果如果str.Length = 0然后s & =“-”其他的& =逃脱(str)结束如果结束如果如果(m_fieldsCInt(W3CLOG.s_ip)) =CInt(W3CLOG.s_ip)然后昏暗的str作为字符串= info。ServerIP如果s.Length > 0然后s & =”“结束如果如果str.Length = 0然后s & =“-”其他的& =逃脱(str)结束如果结束如果如果(m_fieldsCInt(W3CLOG.cs_method)) =CInt(W3CLOG.cs_method)然后昏暗的str作为字符串= info。方法如果s.Length > 0然后s & =”“结束如果如果str.Length = 0然后s & =“-”其他的& =逃脱(str)结束如果结束如果如果(m_fieldsCInt(W3CLOG.cs_uri_stem)) =CInt(W3CLOG.cs_uri_stem)然后昏暗的str作为字符串= info。URIStem如果s.Length > 0然后s & =”“结束如果如果str.Length = 0然后s & =“-”其他的& =逃脱(str)结束如果结束如果如果(m_fieldsCInt(W3CLOG.cs_uri_query)) =CInt(W3CLOG.cs_uri_query)然后昏暗的str作为字符串= info。URIQuery如果s.Length > 0然后s & =”“结束如果如果str.Length = 0然后s & =“-”其他的& =逃脱(str)结束如果结束如果如果(m_fieldsCInt(W3CLOG.s_port)) =CInt(W3CLOG.s_port)然后昏暗的n作为整数= info。ServerPort如果s.Length > 0然后s & =”“结束如果s & = n.ToString ()结束如果如果(m_fieldsCInt(W3CLOG.cs_username)) =CInt(W3CLOG.cs_username)然后昏暗的str作为字符串= info。用户名如果s.Length > 0然后s & =”“结束如果如果str.Length = 0然后s & =“-”其他的& =逃脱(str)结束如果结束如果如果(m_fieldsCInt(W3CLOG.c_ip)) =CInt(W3CLOG.c_ip)然后昏暗的str作为字符串= info。ClientIP如果s.Length > 0然后s & =”“结束如果如果str.Length = 0然后s & =“-”其他的& =逃脱(str)结束如果结束如果如果(m_fieldsCInt(W3CLOG.cs_version)) =CInt(W3CLOG.cs_version)然后昏暗的str作为字符串= info。ProtocolVersion如果s.Length > 0然后s & =”“结束如果如果str.Length = 0然后s & =“-”其他的& =逃脱(str)结束如果结束如果如果(m_fieldsCInt(W3CLOG.cs_user_agent)) =CInt(W3CLOG.cs_user_agent)然后昏暗的str作为字符串= info。UserAgent如果s.Length > 0然后s & =”“结束如果如果str.Length = 0然后s & =“-”其他的& =逃脱(str)结束如果结束如果如果(m_fieldsCInt(W3CLOG.cs_cookie)) =CInt(W3CLOG.cs_cookie)然后昏暗的str作为字符串= info。饼干如果s.Length > 0然后s & =”“结束如果如果str.Length = 0然后s & =“-”其他的& =逃脱(str)结束如果结束如果如果(m_fieldsCInt(W3CLOG.cs_referer)) =CInt(W3CLOG.cs_referer)然后昏暗的str作为字符串= info。介绍人如果s.Length > 0然后s & =”“结束如果如果str.Length = 0然后s & =“-”其他的& =逃脱(str)结束如果结束如果如果(m_fieldsCInt(W3CLOG.cs_host)) =CInt(W3CLOG.cs_host)然后昏暗的str作为字符串= info。宿主如果s.Length > 0然后s & =”“结束如果如果str.Length = 0然后s & =“-”其他的& =逃脱(str)结束如果结束如果如果(m_fieldsCInt(W3CLOG.sc_status)) =CInt(W3CLOG.sc_status)然后昏暗的n作为整数= info。状态如果s.Length > 0然后s & =”“结束如果s & = n.ToString ()结束如果如果(m_fieldsCInt(W3CLOG.sc_substatus)) =CInt(W3CLOG.sc_substatus)然后昏暗的n作为整数= info。ProtocolSubStatus如果s.Length > 0然后s & =”“结束如果s & = n.ToString ()结束如果如果(m_fieldsCInt(W3CLOG.sc_win32_status)) =CInt(W3CLOG.sc_win32_status)然后昏暗的n作为整数= info。Win32Status如果s.Length > 0然后s & =”“结束如果s & = n.ToString ()结束如果如果(m_fieldsCInt(W3CLOG.sc_bytes)) =CInt(W3CLOG.sc_bytes)然后昏暗的n作为整数= info。BytesSent如果s.Length > 0然后s & =”“结束如果如果n < 0然后s & =“-”其他的s & = n.ToString ()结束如果结束如果如果(m_fieldsCInt(W3CLOG.cs_bytes)) =CInt(W3CLOG.cs_bytes)然后昏暗的n作为整数= info。BytesReceived如果s.Length > 0然后s & =”“结束如果如果n < 0然后s & =“-”其他的s & = n.ToString ()结束如果结束如果如果(m_fieldsCInt(W3CLOG.time_taken)) =CInt(W3CLOG.time_taken)然后昏暗的n作为整数= info。TimeTaken如果s.Length > 0然后s & =”“结束如果如果n < 0然后s & =“-”其他的s & = n.ToString ()结束如果结束如果s & = Constants.vbCrLfWriteString (s)m_sw.Flush ()结束结束公共_server作为服务器=没有什么公共_result作为布尔公共W3CLogHandlerExample ()试一试昏暗的enumState作为状态昏暗的_loghandler作为CW3CLogHandler'创建一个服务器对象的实例_server =Leadtools.MediaStreaming.Server ()’创建日志处理程序_loghandler =CW3CLogHandler (“ltmsServer_”“LEADTOOLS媒体流媒体服务器”真正的“% ltmsLogFolder %”0,'设置日志处理程序_server。ILogHandler = _loghandler的演示,比较我们刚刚设置的界面昏暗的ihandler作为ILtmsLogHandler =没有什么ihandler = _server。ILogHandler如果ihandlerCType(_loghandler ILtmsLogHandler)然后_result =返回结束如果’加载位于可执行文件夹下的config子文件夹中的配置文件’或将此部分注释掉,以使用服务器的默认设置运行_server。ImportConfigFile (“% ltmsConfigFolder % \ LeadtoolsMediaStreamingServer.xml”启动服务器_server.Start ()确认运行状态以作演示用途enumState = _server。状态如果enumState =状态。开始然后’显示一条消息,提示服务器正在运行并等待OK对话框。显示(服务器已启动。按OK停止。”“LEADTOOLS媒体流示例”, MessageBoxButtons。好的,MessageBoxIcon.Information)结束如果停止服务器_server。停止()'删除日志处理程序_server。ILogHandler =没有什么_result =真正的e1作为异常_result =结束试一试结束
需求

目标平台

Leadtools。MediaStreaming组装
188金宝搏的网址客服|支持|联系我们|知识产权的通知
©1991 - 2021领先的技术公司。保留所有权利。