⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 zlibcompressor.h

📁 这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用于网络游戏医学图像网关的高qos要求.更详细的内容可阅读相应的材料
💻 H
字号:
// ZlibCompressor.h,v 1.1 2003/09/25 16:38:58 schmidt Exp

#ifndef ZLIB_COMPRESSOR_H
#define ZLIB_COMPRESSOR_H

#include "Protocol_Task.h"

#include "CompressorBase.h"

#include <zlib.h>

class ZlibCompressor : public CompressorBase
{
public:
    ZlibCompressor();
    ~ZlibCompressor();

  // This is called when the compressor is on the
  // downstream side. We'll take the message, compress it
  // and move it along to the next module.
  int send (ACE_Message_Block *message,
            ACE_Time_Value *timeout,
            ACE_Message_Block*& compressed);

  // This one is called on the upstream side.  No surprise: we
  // decompress the data and send it on up the stream.
  int recv (ACE_Message_Block *message,
            ACE_Time_Value *timeout,
            ACE_Message_Block*& decompressed);

private:
    z_stream zstream_;
    bool isDeflateInitialised_;
};

#endif /* ZLIB_COMPRESSOR_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -