00001 // -*- c++ -*- 00002 //------------------------------------------------------------------------------ 00003 // UNIXAddress.h 00004 //------------------------------------------------------------------------------ 00005 // Copyright (c) 1999 by Vladislav Grinchenko 00006 // 00007 // This library is free software; you can redistribute it and/or 00008 // modify it under the terms of the GNU Library General Public 00009 // License as published by the Free Software Foundation; either 00010 // version 2 of the License, or (at your option) any later version. 00011 //------------------------------------------------------------------------------ 00012 // Created: 03/22/99 00013 //------------------------------------------------------------------------------ 00014 #ifndef UNIX_ADDRESS_H 00015 #define UNIX_ADDRESS_H 00016 00017 #if !defined(WIN32) 00018 00019 #include "assa/Address.h" 00020 00021 namespace ASSA { 00022 00028 class UNIXAddress : public Address { 00029 public: 00033 UNIXAddress (const char * socket_name_); 00034 00038 UNIXAddress (SA* socket_address_); 00039 00041 virtual ~UNIXAddress (); 00042 00044 const int getLength () const; 00045 00047 SA* getAddress () const; 00048 00049 private: 00051 SA_UN m_address; 00052 }; 00053 00054 inline 00055 UNIXAddress:: 00056 ~UNIXAddress () { trace("UNIXAddress::~UNIXAddress"); } 00057 00058 inline const int 00059 UNIXAddress:: 00060 getLength () const { return sizeof (m_address); } 00061 00062 inline SA* 00063 UNIXAddress:: 00064 getAddress () const { return (SA*) &m_address; } 00065 00066 } // end namespace ASSA 00067 00068 #endif /* !defined WIN32 */ 00069 00070 #endif /* UNIX_ADDRESS_H */