datagram.h
来自「ace开发环境 用来开发网络程序 其运用了设计模式、多平台、C++等多种知识」· C头文件 代码 · 共 140 行
H
140 行
/* -*- c++ -*- */// $Id: Datagram.h 58273 2004-06-10 22:44:29Z shuston $#ifndef JAWS_DATAGRAM_H#define JAWS_DATAGRAM_H#include "ace/Addr.h"#include "ace/Synch.h"#include "ace/Singleton.h"#include "ace/SOCK_Dgram.h"#include "jaws3/Export.h"#include "jaws3/Event_Completer.h"class JAWS_Export JAWS_Datagram_Impl{public: virtual ~JAWS_Datagram_Impl (void) {} virtual void accept ( const ACE_Addr &local_sap , ACE_SOCK_Dgram &new_dgram , JAWS_Event_Completer *completer , void *act = 0 ) = 0; // The address to new_dgram is passed back as the data member of // the JAWS_Event_Result that is returned to the completer. virtual void connect ( const ACE_Addr &remote_sap , ACE_SOCK_Dgram &new_dgram , JAWS_Event_Completer *completer , void *act = 0 ) = 0; // The address to new_dgram is passed back as the data member of // the JAWS_Event_Result that is returned to the completer. // ADDR_ANY is assumed for the local access point. virtual void connect ( const ACE_Addr &remote_sap , ACE_SOCK_Dgram &new_dgram , const ACE_Addr &local_sap , JAWS_Event_Completer *completer , void *act = 0 ) = 0; // The address to new_dgram is passed back as the data member of // the JAWS_Event_Result that is returned to the completer. // Use the specified local access point. virtual void accept ( const ACE_Addr &local_sap , ACE_SOCK_Dgram &new_dgram , JAWS_Event_Completer *completer , const ACE_Time_Value &timeout , void *act = 0 ) = 0; // The address to new_dgram is passed back as the data member of // the JAWS_Event_Result that is returned to the completer. virtual void connect ( const ACE_Addr &remote_sap , ACE_SOCK_Dgram &new_dgram , JAWS_Event_Completer *completer , const ACE_Time_Value &timeout , void *act = 0 ) = 0; // The address to new_dgram is passed back as the data member of // the JAWS_Event_Result that is returned to the completer. // ADDR_ANY is assumed for the local access point. virtual void connect ( const ACE_Addr &remote_sap , ACE_SOCK_Dgram &new_dgram , const ACE_Addr &local_sap , JAWS_Event_Completer *completer , const ACE_Time_Value &timeout , void *act = 0 ) = 0; // The address to new_dgram is passed back as the data member of // the JAWS_Event_Result that is returned to the completer. // Use the specified local access point.};class JAWS_Export JAWS_Datagram{public: JAWS_Datagram (JAWS_Datagram_Impl *impl = 0); static JAWS_Datagram * instance (void) { return ACE_Singleton<JAWS_Datagram, ACE_SYNCH_MUTEX>::instance (); } void accept ( const ACE_Addr &local_sap , ACE_SOCK_Dgram &new_dgram , JAWS_Event_Completer *completer , void *act = 0 ); void connect ( const ACE_Addr &remote_sap , ACE_SOCK_Dgram &new_dgram , JAWS_Event_Completer *completer , void *act = 0 ); void connect ( const ACE_Addr &remote_sap , ACE_SOCK_Dgram &new_dgram , const ACE_Addr &local_sap , JAWS_Event_Completer *completer , void *act = 0 ); void accept ( const ACE_Addr &local_sap , ACE_SOCK_Dgram &new_dgram , JAWS_Event_Completer *completer , const ACE_Time_Value &timeout , void *act = 0 ); void connect ( const ACE_Addr &remote_sap , ACE_SOCK_Dgram &new_dgram , JAWS_Event_Completer *completer , const ACE_Time_Value &timeout , void *act = 0 ); void connect ( const ACE_Addr &remote_sap , ACE_SOCK_Dgram &new_dgram , const ACE_Addr &local_sap , JAWS_Event_Completer *completer , const ACE_Time_Value &timeout , void *act = 0 );private: JAWS_Datagram_Impl *impl_;};#endif /* JAWS_DATAGRAM_H */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?