00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file LSOCK_CODgram.h 00006 * 00007 * $Id: LSOCK_CODgram.h 80826 2008-03-04 14:51:23Z wotte $ 00008 * 00009 * @author Douglas C. Schmidt <schmidt@cs.wustl.edu> 00010 */ 00011 //============================================================================= 00012 00013 00014 #ifndef ACE_LOCAL_SOCK_CODGRAM_H 00015 #define ACE_LOCAL_SOCK_CODGRAM_H 00016 #include /**/ "ace/pre.h" 00017 00018 #include /**/ "ace/config-all.h" 00019 00020 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00021 # pragma once 00022 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00023 00024 #if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS) 00025 00026 #include "ace/LSOCK.h" 00027 #include "ace/SOCK_CODgram.h" 00028 #include "ace/Addr.h" 00029 00030 ACE_BEGIN_VERSIONED_NAMESPACE_DECL 00031 00032 /** 00033 * @class ACE_LSOCK_CODgram 00034 * 00035 * @brief Defines the member functions for the <ACE_LSOCK> connected 00036 * datagram abstraction. 00037 */ 00038 class ACE_Export ACE_LSOCK_CODgram : public ACE_SOCK_CODgram, public ACE_LSOCK 00039 { 00040 public: 00041 // = Initialization methods. 00042 /// Default constructor. 00043 ACE_LSOCK_CODgram (void); 00044 00045 /// Initiate a connected-datagram. 00046 ACE_LSOCK_CODgram (const ACE_Addr &remote_sap, 00047 const ACE_Addr &local_sap = ACE_Addr::sap_any, 00048 int protocol_family = PF_UNIX, 00049 int protocol = 0); 00050 00051 /// Initiate a connected-datagram. 00052 int open (const ACE_Addr &remote_sap, 00053 const ACE_Addr &local_sap = ACE_Addr::sap_any, 00054 int protocol_family = PF_UNIX, 00055 int protocol = 0); 00056 00057 /// Get underlying handle. 00058 ACE_HANDLE get_handle (void) const; 00059 00060 /// Set underlying handle. 00061 void set_handle (ACE_HANDLE); 00062 00063 /// Dump the state of an object. 00064 void dump (void) const; 00065 00066 /// Declare the dynamic allocation hooks. 00067 ACE_ALLOC_HOOK_DECLARE; 00068 }; 00069 00070 ACE_END_VERSIONED_NAMESPACE_DECL 00071 00072 #if defined (__ACE_INLINE__) 00073 #include "ace/LSOCK_CODgram.inl" 00074 #endif /* __ACE_INLINE__ */ 00075 00076 #endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */ 00077 #include /**/ "ace/post.h" 00078 #endif /* ACE_LOCAL_SOCK_CODGRAM_H */