请各位大侠帮我解释一下:SocketAsyncEventArgsPool

boss_kg 2012-04-23 10:32:36
菜鸟我刚刚开始学些网络这方面的,在msdn中看到SocketAsyncEventArgs例子中的SocketAsyncEventArgsPool 不太明白这个对象是什么意思,也没有找到在哪定义了这个类,求各位大侠帮忙解释一下。
非常感谢!
...全文
366 5 打赏 收藏 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
心如止水521 2013-08-13
  • 打赏
  • 举报
回复
对这个问题也是不明白,看了上面的回复才知道。原来这是自己写的一个类
boss_kg 2012-05-15
  • 打赏
  • 举报
回复
感谢各位了。!
马少华 2012-05-11
  • 打赏
  • 举报
回复
是的,这个类是自己写的。
boss_kg 2012-04-23
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 的回复:]

看SocketAsyncEventArgs 构造函数的帮助,代码如下
C# code


// Represents a collection of reusable SocketAsyncEventArgs objects.
class SocketAsyncEventArgsPool
{
Stack<SocketAsyncEventArgs> m_pool;

// ……
[/Quote]

你的意思是说这个是自己写的不是系统自带的吗!
bdmh 2012-04-23
  • 打赏
  • 举报
回复
看SocketAsyncEventArgs 构造函数的帮助,代码如下


// Represents a collection of reusable SocketAsyncEventArgs objects.
class SocketAsyncEventArgsPool
{
Stack<SocketAsyncEventArgs> m_pool;

// Initializes the object pool to the specified size
//
// The "capacity" parameter is the maximum number of
// SocketAsyncEventArgs objects the pool can hold
public SocketAsyncEventArgsPool(int capacity)
{
m_pool = new Stack<SocketAsyncEventArgs>(capacity);
}

// Add a SocketAsyncEventArg instance to the pool
//
//The "item" parameter is the SocketAsyncEventArgs instance
// to add to the pool
public void Push(SocketAsyncEventArgs item)
{
if (item == null) { throw new ArgumentNullException("Items added to a SocketAsyncEventArgsPool cannot be null"); }
lock (m_pool)
{
m_pool.Push(item);
}
}

// Removes a SocketAsyncEventArgs instance from the pool
// and returns the object removed from the pool
public SocketAsyncEventArgs Pop()
{
lock (m_pool)
{
return m_pool.Pop();
}
}

// The number of SocketAsyncEventArgs instances in the pool
public int Count
{
get { return m_pool.Count; }
}

}
内容概要:WiFiSupply斯普莱WFS7000X25是一款5GHz全频段、300Mbps无线速率的经济型工业级大功率机载无线终端,支持802.11a/n标准及TDMA时分多址私有协议,具备强抗干扰能力、通信延迟低于1ms、无缝漫游切换延迟≤30ms等特点。设备采用2T2R MIMO技术,支持4920MHz~6100MHz宽频段和5/10/20/40MHz频宽,发射功率达25dBm(320mW),配合基站可在空旷环境下实现1公里以上传输距离。产品具备IP54防护等级,支持-45℃~85℃宽温工作,通过EMC、防雷浪涌、高低温等多项权威认证,内置多重看门狗机制保障长期稳定运行。支持胖瘦一体模式、Fast Roaming快速漫游、链路聚合、主备链路、VLAN、QoS、VPN、巨量安全隧道等多种高级网络功能,并可通过Web、图形化软件、云端或第三方平台进行统一管理,提供API接口支持定制化集成。; 适合人群:从事工业自动化、智慧物流、智能制造等领域中无线通信系统设计、部署与运维的工程技术人员及网络管理人员。; 使用场景及目标:①用于AMR/AGV/RGV、无人叉车、四向穿梭车、堆垛机等移动设备的高速稳定无线接入;②实现室内外远距离无线桥接与覆盖,如车载、船载、火车视频回传、无人机遥控等场景;③构建高安全性、高可靠性的工业无线网络,满足PLC数据传输、分拣系统控制、物联网拓展等需求; 阅读建议:此文档为产品技术说明书,重点在于掌握其技术参数、功能特性和行业应用方案,建议结合实际项目需求关注供电方式、安装选项、漫游性能、安全加密及管理接口等内容,并参考官方提供的配置工具与API文档进行系统集成与调试。

111,128

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Creator Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧