上一页 1 2 3 4 5 6 7 ··· 9 下一页
摘要: SocketAsyncEventArgs 连接池SocketAsyncEventArgsPoolusing System;using System.Net.Sockets;using System.Collections.Generic;namespace LinFx.Net.Sockets{ class SocketAsyncEventArgsPool { private readonly Stack<SocketAsyncEventArgs> m_pool; private readonly object syncLocker = new object(); public So 阅读全文
posted @ 2011-07-16 11:11 一浩瀚星空一 阅读(4744) 评论(1) 推荐(1) 编辑
摘要: using System;using System.Collections.Generic;using System.IO;using System.Net;using System.Net.Sockets;using System.Threading;using LinFx.Net;using LinFx.Win32;namespace LinFx.Net.Server{ /// <summary> /// 异步I/O模型 /// </summary> public class IOCPServer : IDisposable { private IntPtr m_h 阅读全文
posted @ 2011-07-08 14:37 一浩瀚星空一 阅读(998) 评论(0) 推荐(0) 编辑
摘要: ReaderWriterLock 用於同步存取資源。 它能在任何指定時間並行讀取多重執行緒或寫入單一執行緒。 如果資源不常變更,ReaderWriterLock 的產量優於每次一的鎖定 (例如 Monitor)。 如果不常寫入 (而且寫入時間很短) 而是以讀取為主,則 ReaderWriterLoc 阅读全文
posted @ 2011-07-07 23:44 一浩瀚星空一 阅读(3454) 评论(0) 推荐(1) 编辑
摘要: 在动态编程时,我们常常需要运行时确定调用对象的哪个属性或哪个方法。这个任务通常可以用反射来解决。但众所周知,反射的性能要比静态指定的方式低很多,因为反射要通过运行时复杂的机制完成。能否获得性能和灵活性兼备的动态调用?我在开发VBF的最新功能时反复考虑了这个问题。我们通常动态调用一个对象的属性是采用这 阅读全文
posted @ 2011-06-12 08:12 一浩瀚星空一 阅读(261) 评论(0) 推荐(1) 编辑
摘要: using System;using System.Collections.Generic;using System.Diagnostics;namespace ConsoleApplication5_Inject{ class Entity { } class Program { staticvo 阅读全文
posted @ 2011-05-24 14:12 一浩瀚星空一 阅读(172) 评论(0) 推荐(0) 编辑
摘要: namespace ConsoleApplication2 { class Program { class Customer { public int id; public string name; } class Helper<T> { public void OrderBy<TKey>(Func 阅读全文
posted @ 2011-05-14 16:10 一浩瀚星空一 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 今天有位程序员要离开了,,(我们总共4个开发) 嘻嘻, 一会美兹兹的, 可以分他家产了,, 搬键盘的般键盘, 搬鼠标的搬鼠标。。还有个显示器,,,,,,, 嘻嘻~~还有一条2G内存 阅读全文
posted @ 2011-04-23 13:45 一浩瀚星空一 阅读(169) 评论(0) 推荐(0) 编辑
摘要: IP多播(也称多址广播或组播)技术,是一种允许一台或多台主机(多播源)发送单一数据包到多台主机(一次的,同时的)的TCP/IP网络技术。 多播作为一点对多点的通信,是节省网络带宽的有效方法之一。 在网络音频/视频广播的应用中,当需要将一个节点的信号传送到多个节点时,无论是采用重复点对点通信方式,还是 阅读全文
posted @ 2010-07-09 22:17 一浩瀚星空一 阅读(1141) 评论(0) 推荐(0) 编辑
摘要: 单播(点对点) 通信,即网络中单一的源节点发送封包到单一的上的节点。 在广播通信中, 网络层提供了将封包从一个节点发送到所有其他节点的服务。 利用广播(broadcast) 可以将数据发送给本地子网上的每个机器。广播的缺点是如果多个进程都发送广播数据, 网络就会阻塞。 1. 服务端 <!--<br 阅读全文
posted @ 2010-07-08 08:18 一浩瀚星空一 阅读(1508) 评论(0) 推荐(0) 编辑
摘要: 这篇文章本来是星期五晚写好了, 因6日去旅游了, 没来得急发上来 1. 同样, 我们先看看这一个比简单的 结构体 <!--<br/ /><br/ />Code highlighting produced by Actipro CodeHighlighter (freeware)<br/ />http 阅读全文
posted @ 2010-05-30 08:35 一浩瀚星空一 阅读(1037) 评论(0) 推荐(1) 编辑
上一页 1 2 3 4 5 6 7 ··· 9 下一页