07 2011 档案
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace WindowsFormsApplication3{ public partial class Form3 : Form { public Form3() { InitializeComponent(); } public struct ComboBoxItem&l
阅读全文
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace WindowsFormsApplication3{ public partial class Form2 : Form { public Form2() { InitializeComponent(); this.comboBox1.DropDownStyle =
阅读全文
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace WindowsFormsApplication3{ public partial class Form1 : Form { public Form1() { InitializeComponent(); } class User { public int id {
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:ReaderWriterLock 用於同步存取資源。 它能在任何指定時間並行讀取多重執行緒或寫入單一執行緒。 如果資源不常變更,ReaderWriterLock 的產量優於每次一的鎖定 (例如 Monitor)。 如果不常寫入 (而且寫入時間很短) 而是以讀取為主,則 ReaderWriterLoc
阅读全文