摘要:
/// <summary> /// 基于LRU算法的连接检测 /// </summary> public class LRUDetect:IDisposable { /// <summary> /// 构建检测器 /// </summary> /// <param name="timeout">超时时间以毫秒为单位</param> public LRUDetect(int timeout) { mTimeout = timeout; ... 阅读全文
posted @ 2013-05-01 09:58
牛德彪
阅读(270)
评论(0)
推荐(0)
摘要:
/// <summary> /// Copyright © henryfan 2012 /// Email: henryfan@msn.com /// HomePage: http://www.ikende.com /// CreateTime: 2012/10/27 21:56:05 /// </summary> public class SecondCounter:IDisposable { interface ICounter { void Proce... 阅读全文
posted @ 2013-05-01 09:57
牛德彪
阅读(227)
评论(0)
推荐(0)
摘要:
[ThreadStatic] static char[] mTempChars; protected static char[] GetTempData() { if (mTempChars == null) mTempChars = new char[1024 * 64]; return mTempChars; } public static string Replace(string value, string oldData, string ... 阅读全文
posted @ 2013-05-01 09:56
牛德彪
阅读(481)
评论(0)
推荐(0)
摘要:
最近在制定一个网络文件交互的协议,协议制订上采用了HTTP协议的方式,因此需对协议数据进行一个分割处理;虽然使用String的Split方法可以达到目的,但通过返编译查看其代码后发现实现相对复杂性能上也不太理想;因此自己实现一个简单的字符分割处理类,在实现后和String的Sqlit方法进行了一个简单的对比,发现性能要比Sqlit高所以分享出来.测试情况分割处理的内容Cache-Control:public, max-age=0Content-Encoding:gzipContent-Length:9480Content-Type:text/html; charset=utf-8Date:W. 阅读全文
posted @ 2013-05-01 09:55
牛德彪
阅读(308)
评论(0)
推荐(0)
摘要:
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows.Forms;using System.Windows;namespace IKende.Windows{ public class ThreadUIInvoke { public delegate void EventUIInvoke(); public delegate void EventUIInvoke<T>(T t); pub... 阅读全文
posted @ 2013-05-01 09:54
牛德彪
阅读(193)
评论(0)
推荐(0)
摘要:
using System;using System.Collections.Generic;using System.Text; namespace WindowsFormsApplication1{ using System; using System.Drawing; using System.Runtime.InteropServices; using Microsoft.Win32; using System.Reflection; using System.Collections.Generic; namespace BlackFox.Wi... 阅读全文
posted @ 2013-05-01 09:53
牛德彪
阅读(1056)
评论(1)
推荐(1)