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

📄 xmit.h

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

#ifndef XMIT_H
#define XMIT_h

#include "Protocol_Task.h"

// Forward reference reduces #include dependencies
class ACE_SOCK_Stream;

/* A class suitable for sending data to a peer from within an
   ACE_Stream.
 */
class Xmit : public Protocol_Task
{
public:
  typedef Protocol_Task inherited;

  // We must be given a valid peer when constructed.  Without that we
  // don't know who to send data to.
  Xmit (ACE_SOCK_Stream &peer);
  ~Xmit (void);

  // As you know, close() will be called in a couple of ways by the
  // ACE framework.  We use that opportunity to terminate the
  // connection to the peer.
  int close (u_long flags);

protected:

  ACE_SOCK_Stream &peer (void)
  {
    return this->peer_;
  }

  // Send the data to the peer.  By now it will have been completely
  // protocol-ized by other tasks in the stream.
  int send (ACE_Message_Block *message,
            ACE_Time_Value *timeout);

private:
  // A representation of the peer we're talking to.
  ACE_SOCK_Stream &peer_;
};

#endif /* XMIT_H */

⌨️ 快捷键说明

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