#ifndef ROOT_TInetAddress
#define ROOT_TInetAddress
#ifndef ROOT_TObject
#include "TObject.h"
#endif
#ifndef ROOT_TString
#include "TString.h"
#endif
#include <vector>
#ifdef R__GLOBALSTL
namespace std { using ::vector; }
#endif
class TInetAddress : public TObject {
friend class TSystem;
friend class TUnixSystem;
friend class TWinNTSystem;
friend class TUUID;
friend class TSocket;
friend class TServerSocket;
friend class TXSocket;
public:
typedef std::vector<UInt_t> AddressList_t;
typedef std::vector<TString> AliasList_t;
private:
TString fHostname;
UInt_t fAddress;
Int_t fFamily;
Int_t fPort;
AddressList_t fAddresses;
AliasList_t fAliases;
TInetAddress(const char *host, UInt_t addr, Int_t family, Int_t port = -1);
void AddAddress(UInt_t addr);
void AddAlias(const char *alias);
public:
TInetAddress();
TInetAddress(const TInetAddress &adr);
TInetAddress &operator=(const TInetAddress &rhs);
virtual ~TInetAddress() { }
UInt_t GetAddress() const { return fAddresses[0]; }
UChar_t *GetAddressBytes() const;
const char *GetHostAddress() const;
const char *GetHostName() const { return (const char *) fHostname; }
Int_t GetFamily() const { return fFamily; }
Int_t GetPort() const { return fPort; }
const AddressList_t &GetAddresses() const { return fAddresses; }
const AliasList_t &GetAliases() const { return fAliases; }
Bool_t IsValid() const { return fFamily == -1 ? kFALSE : kTRUE; }
void Print(Option_t *option="") const;
static const char *GetHostAddress(UInt_t addr);
ClassDef(TInetAddress,3)
};
#endif
Last change: Fri Jul 11 13:54:23 2008
Last generated: 2008-07-11 13:54
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.