00001 /* -*- C++ -*- */ 00002 00003 //============================================================================= 00004 /** 00005 * @file LSOCK_Stream.h 00006 * 00007 * LSOCK_Stream.h,v 4.21 2005/11/26 03:13:13 ossama Exp 00008 * 00009 * @author Doug Schmidt 00010 */ 00011 //============================================================================= 00012 00013 00014 #ifndef ACE_LOCAL_SOCK_STREAM_H 00015 #define ACE_LOCAL_SOCK_STREAM_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/SOCK_Stream.h" 00027 #include "ace/UNIX_Addr.h" 00028 #include "ace/LSOCK.h" 00029 00030 ACE_BEGIN_VERSIONED_NAMESPACE_DECL 00031 00032 /** 00033 * @class ACE_LSOCK_Stream 00034 * 00035 * @brief Create a Local ACE_SOCK stream. 00036 */ 00037 class ACE_Export ACE_LSOCK_Stream : public ACE_SOCK_Stream, public ACE_LSOCK 00038 { 00039 public: 00040 // = Send/recv methods. 00041 /// Send iovecs via <::writev>. 00042 ssize_t send_msg (const iovec iov[], 00043 size_t n, 00044 ACE_HANDLE handle); 00045 00046 /// Send iovecs via <::writev>. 00047 ssize_t recv_msg (iovec iov[], 00048 size_t n, 00049 ACE_HANDLE &handle); 00050 00051 /// Get handle. 00052 ACE_HANDLE get_handle (void) const; 00053 00054 /// Overrides set_handle from the base classes. 00055 void set_handle (ACE_HANDLE fd); 00056 00057 // = Meta-type info 00058 typedef ACE_UNIX_Addr PEER_ADDR; 00059 00060 /// Dump the state of an object. 00061 void dump (void) const; 00062 00063 /// Declare the dynamic allocation hooks. 00064 ACE_ALLOC_HOOK_DECLARE; 00065 00066 /// This method simply returns the "local" addr. 00067 int get_local_addr (ACE_Addr &) const; 00068 00069 /// This method returns the "local" addr since it's the same value 00070 /// for UNIX domain sockets. 00071 int get_remote_addr (ACE_Addr &) const; 00072 }; 00073 00074 ACE_END_VERSIONED_NAMESPACE_DECL 00075 00076 #if defined (__ACE_INLINE__) 00077 #include "ace/LSOCK_Stream.inl" 00078 #endif /* __ACE_INLINE__ */ 00079 00080 #endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */ 00081 #include /**/ "ace/post.h" 00082 #endif /* ACE_LOCAL_SOCK_STREAM_H */