00001 // MEM_Stream.cpp,v 4.10 2005/10/28 16:14:53 ossama Exp 00002 00003 #include "ace/MEM_Stream.h" 00004 00005 #if (ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1) 00006 00007 #if !defined (__ACE_INLINE__) 00008 #include "ace/MEM_Stream.inl" 00009 #endif /* __ACE_INLINE__ */ 00010 00011 ACE_RCSID(ace, MEM_Stream, "MEM_Stream.cpp,v 4.10 2005/10/28 16:14:53 ossama Exp") 00012 00013 ACE_BEGIN_VERSIONED_NAMESPACE_DECL 00014 00015 ACE_ALLOC_HOOK_DEFINE(ACE_MEM_Stream) 00016 00017 void 00018 ACE_MEM_Stream::dump (void) const 00019 { 00020 #if defined (ACE_HAS_DUMP) 00021 ACE_TRACE ("ACE_MEM_Stream::dump"); 00022 #endif /* ACE_HAS_DUMP */ 00023 } 00024 00025 int 00026 ACE_MEM_Stream::close (void) 00027 { 00028 this->send ((char *)0, 0); 00029 00030 this->fini (); 00031 00032 #if defined (ACE_WIN32) 00033 // We need the following call to make things work correctly on 00034 // Win32, which requires use to do a <close_writer> before doing the 00035 // close in order to avoid losing data. Note that we don't need to 00036 // do this on UNIX since it doesn't have this "feature". Moreover, 00037 // this will cause subtle problems on UNIX due to the way that 00038 // fork() works. 00039 this->close_writer (); 00040 #endif /* ACE_WIN32 */ 00041 // Close down the socket. 00042 return ACE_SOCK::close (); 00043 } 00044 00045 ACE_END_VERSIONED_NAMESPACE_DECL 00046 00047 #endif /* ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1 */