资源简介
MQ4CPP (Message Queuing for C++) is an implementation of enterprise messaging system, aka "message-oriented middleware" (MOM). It lets C++ application threads communicate with one another through exchanging messages. A message is a request, report, and/or event that contains information needed to coordinate communication between different applications. It provides a level of abstraction, so you can separate the details about the destination system from the application code. MQ4CCP lets C++ applications that share a messaging system exchange messages, and simplifies application development by providing a standard interface for creating, sending, and receiving messages. It implements the following messaging paradigms: Direct/Indirect messaging (local), unsolicited messaging (remote), Request/Reply (remote), conversation (remote), and broadcast (local/remote).
代码片段和文件信息
///////////////////////////////////////////////////////////////////////////////
// MQ4CPP - Message queuing for C++
// Copyright (C) 2004-2007 Riccardo Pompeo (Italy)
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not write to the Free Software
// Foundation Inc. 59 Temple Place Suite 330 Boston MA 02111-1307 USA
//
// WARNING: PacketCompression works using a cache mechanism to avoid to send
// dictionary information and reducing the bandwidth needed. This mechanism works
// only in a peer-to-peer transmition. If you plan to use multicast packets or
// to have a single server with multiple client the cache mechanism doesn‘t work
// correctly because PacketCompression isn‘t able to determine the packet source.
// In this case you should disable caching calling PacketCompression(false)
// WARNING: compression is a cpu-consuming process. Use only if you have a low
// bandwidth connectivity with your peer.
//
#define SILENT
#include “Trace.h“
#include “Logger.h“
#include “Compression.h“
#include “MergeSort.h“
#include “Timer.h“
#include
#define SYMBOLS 256
PacketCompression::PacketCompression(bool theUseCacheMechanism)
{
TRACE(“PacketCompression::PacketCompression - start“)
itsUseCacheMechanism=theUseCacheMechanism;
stream_length=0;
shift_count=0;
accumulator=0;
bit_count=0;
percent=0;
itsSendPeerReset=true;
reset();
TRACE(“PacketCompression::PacketCompression - end“)
}
PacketCompression::~PacketCompression()
{
TRACE(“PacketCompression::~PacketCompression - start“)
TRACE(“PacketCompression::~PacketCompression - end“)
}
void PacketCompression::reset()
{
TRACE(“PacketCompression::reset - start“)
itsDeflateCacheIndex=0;
for(unsigned cnt=0; cnt < 8; cnt++)
{
itsDeflateCacheSchema[cnt]=0;
itsInflateCacheSchema[cnt]=0;
itsDeflateCacheCheckBit[cnt]=0;
itsInflateCacheCheckBit[cnt]=0;
}
for(unsigned cnt=0; cnt < 8; cnt++)
for(unsigned cnt1=0; cnt1 < 128; cnt1++)
{
itsDeflateCacheDictionary[cnt][cnt1]=0;
itsInflateCacheDictionary[cnt][cnt1]=0;
}
TRACE(“PacketCompression::reset - end“)
}
void PacketCompression::evaluateDictionary(vector< pair >& occurrenceunsigned* evaluator)
{
TRACE(“PacketCompression::evaluateDictionary - start“)
evaluator[0]=(1+0)*8;
evaluator[1]=(1+2)*8;
evaluator[2]=(1+4)*8;
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 621 2006-04-03 05:58 mq4cpp_v1.16\.cdtproject
文件 3470 2006-04-03 05:58 mq4cpp_v1.16\.project
文件 7629 2007-06-23 23:19 mq4cpp_v1.16\ChangeLog
文件 14559 2007-01-14 15:41 mq4cpp_v1.16\Compression.cpp
文件 3164 2007-01-14 15:41 mq4cpp_v1.16\Compression.h
文件 503417 2006-04-03 05:58 mq4cpp_v1.16\docs\class_diagram.png
文件 275929 2006-04-03 05:58 mq4cpp_v1.16\docs\class_diagram_1.png
文件 119780 2006-04-25 21:02 mq4cpp_v1.16\docs\class_diagram_2.png
文件 486397 2007-03-30 12:16 mq4cpp_v1.16\docs\mq4cpp.pdf
....SH. 11776 2007-03-09 19:18 mq4cpp_v1.16\docs\Thumbs.db
文件 6498 2006-12-17 20:57 mq4cpp_v1.16\Encription.cpp
文件 2309 2006-12-17 20:57 mq4cpp_v1.16\Encription.h
文件 21327 2007-01-01 12:26 mq4cpp_v1.16\examples\benchmark.cpp
文件 2654 2006-12-17 20:57 mq4cpp_v1.16\examples\compr.cpp
文件 3392 2006-12-17 20:57 mq4cpp_v1.16\examples\example1.cpp
文件 3949 2006-12-17 20:57 mq4cpp_v1.16\examples\example10.cpp
文件 5220 2006-12-17 20:57 mq4cpp_v1.16\examples\example11.cpp
文件 4172 2006-12-17 20:57 mq4cpp_v1.16\examples\example12.cpp
文件 4620 2006-12-17 20:57 mq4cpp_v1.16\examples\example13.cpp
文件 5868 2007-02-07 11:40 mq4cpp_v1.16\examples\example14.cpp
文件 4220 2006-12-17 20:57 mq4cpp_v1.16\examples\example2.cpp
文件 5034 2006-12-17 20:57 mq4cpp_v1.16\examples\example3.cpp
文件 4196 2006-12-17 20:57 mq4cpp_v1.16\examples\example4.cpp
文件 4690 2006-12-17 20:57 mq4cpp_v1.16\examples\example5.cpp
文件 5509 2006-12-17 20:57 mq4cpp_v1.16\examples\example6.cpp
文件 4934 2006-12-20 21:40 mq4cpp_v1.16\examples\example7.cpp
文件 5808 2006-12-17 20:57 mq4cpp_v1.16\examples\example8.cpp
文件 3835 2006-12-17 20:57 mq4cpp_v1.16\examples\example9.cpp
文件 4866 2007-02-02 17:50 mq4cpp_v1.16\examples\mqftp.cpp
文件 12562 2006-12-17 20:57 mq4cpp_v1.16\examples\peer.cpp
............此处省略56个文件信息
相关资源
- 遗传算法解八数码问题
- C++开发的OPENGL立方体,支持鼠标拖拽
- C++经典书籍集合6本书合集
- VC++打印程序Print
- GIS拓扑自动生成代码
- TCP协议客户服务器方式网络通信对话
- TeeChar8控件及其使用方法针对于VC++
- C++课程设计《日程管理系统》
- 课程设计源码.zip
- MFC函数库.rar
- 图解数据结构C++版源码
- QT c++ dijkstra最短路径工程源码
- 数据结构(C++语言版)_第三版_邓俊辉
- 数据结构与算法分析——C++语言描述
- 小世界网络编程VC++
- 酒店管理系统 QT/C++
- C/C++参考手册大全5本集合.chm
- c++网吧计费管理系统
- 飞行射击游戏源码c++
- 塔防游戏源码c++
- 飞机大战游戏代码c++
- VC++开发界面源码
- 图书管理系统用C++编写的图书管理系
- FTP多线程服务器源码
- 马尔可夫链的c++ C语言实现方法
- 《C++程序设计》 谭浩强 第三版 答案
- Essential C++英文高清非扫描
- 用C++语言编写数学常用算法修订版光
- C++语言程序设计习题集
- C++读取DXF
评论
共有 条评论