2001-10-06 14:13:28 +00:00
|
|
|
#ifndef CNETWORKADDRESS_H
|
|
|
|
#define CNETWORKADDRESS_H
|
|
|
|
|
|
|
|
#include "BasicTypes.h"
|
|
|
|
#include "XSocket.h"
|
|
|
|
#include <sys/socket.h>
|
|
|
|
|
|
|
|
class CString;
|
|
|
|
|
|
|
|
class CNetworkAddress {
|
|
|
|
public:
|
2001-10-14 16:58:01 +00:00
|
|
|
CNetworkAddress(UInt16 port);
|
|
|
|
CNetworkAddress(const CString& hostname, UInt16 port);
|
2001-10-06 14:13:28 +00:00
|
|
|
~CNetworkAddress();
|
|
|
|
|
|
|
|
// manipulators
|
|
|
|
|
|
|
|
// accessors
|
|
|
|
|
2001-10-14 16:58:01 +00:00
|
|
|
const struct sockaddr* getAddress() const;
|
|
|
|
int getAddressLength() const;
|
2001-10-06 14:13:28 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
struct sockaddr m_address;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|