TestCache
所属分类:系统编程
开发工具:Visual C++
文件大小:7KB
下载次数:4
上传日期:2011-01-21 18:48:07
上 传 者:
sToa
说明: 封装一个跨进程缓存类
最近做一个项目,需要记录系统里每个进程访问的IP及Port,然后提交到服务端进行分析,我的思路是用一个缓存文件记录所有进程访问网络的信息,然后在主程序中提取记录再提交。
这里面涉及到多进程访问同一个缓存文件的同步问题,于是封装了下面这个类,自我感觉良好,拿出来和大家分享 :)
* 使用类似于环形链表的机制来保证运行效率
(An inter-process caching class encapsulates a project recently, need to record the system and each process to access the IP Port, and then submit to the server for analysis, and my idea is to use a cache file records information about all processes access the network, and then records and submit to extract the main program. This process, which involves more than access the same cache file synchronization, then package the following categories, feel good about themselves and share out:)* Use a linked list mechanism similar to the ring to ensure operational efficiency)
文件列表:
TestCache\FileMap.cpp (1450, 2009-08-16)
TestCache\FileMap.h (745, 2009-07-21)
TestCache\RecodeLog.cpp (2380, 2009-07-22)
TestCache\RecodeLog.h (805, 2009-07-31)
TestCache\SMutx.cpp (969, 2009-08-06)
TestCache\SMutx.h (575, 2009-07-20)
TestCache\StdAfx.cpp (296, 2009-08-16)
TestCache\StdAfx.h (667, 2009-08-16)
TestCache\TestCache.cpp (1404, 2009-08-16)
TestCache\TestCache.dsp (4954, 2009-08-16)
TestCache\TestCache.plg (1603, 2009-08-16)
TestCache (0, 2009-08-16)
========================================================================
CONSOLE APPLICATION : TestCache
========================================================================
AppWizard has created this TestCache application for you.
This file contains a summary of what you will find in each of the files that
make up your TestCache application.
TestCache.dsp
This file (the project file) contains information at the project level and
is used to build a single project or subproject. Other users can share the
project (.dsp) file, but they should export the makefiles locally.
TestCache.cpp
This is the main application source file.
/////////////////////////////////////////////////////////////////////////////
Other standard files:
StdAfx.h, StdAfx.cpp
These files are used to build a precompiled header (PCH) file
named TestCache.pch and a precompiled types file named StdAfx.obj.
/////////////////////////////////////////////////////////////////////////////
Other notes:
AppWizard uses "TODO:" to indicate parts of the source code you
should add to or customize.
/////////////////////////////////////////////////////////////////////////////
近期下载者:
相关文件:
收藏者: