Replace tabs with spaces in more files.
--HG-- branch : trunk
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
** \file Ipv6Address.h
|
||||
** \date 2006-09-21
|
||||
** \author [email protected]
|
||||
** \file Ipv6Address.h
|
||||
** \date 2006-09-21
|
||||
** \author [email protected]
|
||||
**/
|
||||
/*
|
||||
Copyright (C) 2007 Anders Hedstrom
|
||||
@@ -37,62 +37,62 @@ namespace SOCKETS_NAMESPACE {
|
||||
|
||||
|
||||
/** Ipv6 address implementation.
|
||||
\ingroup basic */
|
||||
\ingroup basic */
|
||||
class Ipv6Address : public SocketAddress
|
||||
{
|
||||
public:
|
||||
/** Create empty Ipv6 address structure.
|
||||
\param port Port number */
|
||||
Ipv6Address(port_t port = 0);
|
||||
/** Create Ipv6 address structure.
|
||||
\param a Socket address in network byte order
|
||||
\param port Port number in host byte order */
|
||||
Ipv6Address(struct in6_addr& a,port_t port);
|
||||
/** Create Ipv6 address structure.
|
||||
\param host Hostname to be resolved
|
||||
\param port Port number in host byte order */
|
||||
Ipv6Address(const std::string& host,port_t port);
|
||||
Ipv6Address(struct sockaddr_in6&);
|
||||
~Ipv6Address();
|
||||
/** Create empty Ipv6 address structure.
|
||||
\param port Port number */
|
||||
Ipv6Address(port_t port = 0);
|
||||
/** Create Ipv6 address structure.
|
||||
\param a Socket address in network byte order
|
||||
\param port Port number in host byte order */
|
||||
Ipv6Address(struct in6_addr& a,port_t port);
|
||||
/** Create Ipv6 address structure.
|
||||
\param host Hostname to be resolved
|
||||
\param port Port number in host byte order */
|
||||
Ipv6Address(const std::string& host,port_t port);
|
||||
Ipv6Address(struct sockaddr_in6&);
|
||||
~Ipv6Address();
|
||||
|
||||
// SocketAddress implementation
|
||||
// SocketAddress implementation
|
||||
|
||||
operator struct sockaddr *();
|
||||
operator socklen_t();
|
||||
bool operator==(SocketAddress&);
|
||||
operator struct sockaddr *();
|
||||
operator socklen_t();
|
||||
bool operator==(SocketAddress&);
|
||||
|
||||
void SetPort(port_t port);
|
||||
port_t GetPort();
|
||||
void SetPort(port_t port);
|
||||
port_t GetPort();
|
||||
|
||||
void SetAddress(struct sockaddr *sa);
|
||||
int GetFamily();
|
||||
void SetAddress(struct sockaddr *sa);
|
||||
int GetFamily();
|
||||
|
||||
bool IsValid();
|
||||
std::auto_ptr<SocketAddress> GetCopy();
|
||||
bool IsValid();
|
||||
std::auto_ptr<SocketAddress> GetCopy();
|
||||
|
||||
/** Convert address struct to text. */
|
||||
std::string Convert(bool include_port = false);
|
||||
std::string Reverse();
|
||||
/** Convert address struct to text. */
|
||||
std::string Convert(bool include_port = false);
|
||||
std::string Reverse();
|
||||
|
||||
/** Resolve hostname. */
|
||||
static bool Resolve(const std::string& hostname,struct in6_addr& a);
|
||||
/** Reverse resolve (IP to hostname). */
|
||||
static bool Reverse(struct in6_addr& a,std::string& name);
|
||||
/** Convert address struct to text. */
|
||||
static std::string Convert(struct in6_addr& a,bool mixed = false);
|
||||
/** Resolve hostname. */
|
||||
static bool Resolve(const std::string& hostname,struct in6_addr& a);
|
||||
/** Reverse resolve (IP to hostname). */
|
||||
static bool Reverse(struct in6_addr& a,std::string& name);
|
||||
/** Convert address struct to text. */
|
||||
static std::string Convert(struct in6_addr& a,bool mixed = false);
|
||||
|
||||
void SetFlowinfo(uint32_t);
|
||||
uint32_t GetFlowinfo();
|
||||
void SetFlowinfo(uint32_t);
|
||||
uint32_t GetFlowinfo();
|
||||
#ifndef _WIN32
|
||||
void SetScopeId(uint32_t);
|
||||
uint32_t GetScopeId();
|
||||
void SetScopeId(uint32_t);
|
||||
uint32_t GetScopeId();
|
||||
#endif
|
||||
|
||||
private:
|
||||
Ipv6Address(const Ipv6Address& ) {} // copy constructor
|
||||
Ipv6Address& operator=(const Ipv6Address& ) { return *this; } // assignment operator
|
||||
struct sockaddr_in6 m_addr;
|
||||
bool m_valid;
|
||||
Ipv6Address(const Ipv6Address& ) {} // copy constructor
|
||||
Ipv6Address& operator=(const Ipv6Address& ) { return *this; } // assignment operator
|
||||
struct sockaddr_in6 m_addr;
|
||||
bool m_valid;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user