The C++ framework for developing highly scalable, high performance servers on Windows platforms.

IWritableAddressRef Class Reference
[AddressesInterfacesProtected destructors on abstract base classes]

Inheritance diagram for IWritableAddressRef:
Collaboration diagram for IWritableAddressRef:

List of all members.


Detailed Description

A reference counted IWritableAddress.

Public Member Functions

virtual void AddRef ()=0
virtual void Release ()=0
virtual sockaddr * GetStorage ()=0
 Returns a pointer to a writable area of memory, represented as a socaddr structure, that is GetSize() bytes long.
virtual int * GetSize ()=0
 Returns a writable integer that contains the size of storage (in bytes) available for the address. You can then use the writable pointer to update this value to the amount of storage actually used. Typically one would copy the address into the memory returned by GetStorage() and then update the size used to the correct value by writing to the value returned from this function. Note that GetSize() will always return the maximum available storage, if you need to know the storage used then call IAddress.Size(). Calling GetSize() resets the size used to the maximum size available. Bleugh, but written so that this works: getsockname(socket, address.GetStorage(), address.GetSize()).
virtual
IWritableAddressRef
GetWritableAddressRef () const =0
 Returns a reference counted view on this address, be sure to call Release() on the IWritableAddressRef when you're done with it.
virtual unsigned short Family () const =0
 Returns the address family of the address.
virtual const sockaddr & AsSockAddr () const =0
 Returns the address as a reference to a sockaddr structure.
virtual int Size () const =0
 Returns the size of the sockaddr structure required to store the address.
virtual IAddressRefGetAddressRef () const =0
 Returns a reference counted view on this address, be sure to call Release() on the IAdressRef when you're done with it.
virtual bool IsWildcardAddress () const =0

Static Public Member Functions

static bool IsValid (const IAddress &address)
static bool IsSameAddress (const IAddress &lhs, const IAddress &rhs)

Protected Member Functions

 ~IWritableAddressRef () override
 We never delete instances of this interface; you must manage the lifetime of the class that implements it.

Constructor & Destructor Documentation

~IWritableAddressRef (  )  [override, protected]

We never delete instances of this interface; you must manage the lifetime of the class that implements it.


Member Function Documentation

virtual void AddRef (  )  [pure virtual]

Implemented in CAddressImpl.

virtual void Release (  )  [pure virtual]

Implemented in CAddressImpl.

virtual sockaddr* GetStorage (  )  [pure virtual, inherited]

Returns a pointer to a writable area of memory, represented as a socaddr structure, that is GetSize() bytes long.

Implemented in CAddress, and CAddressImpl.

virtual int* GetSize (  )  [pure virtual, inherited]

Returns a writable integer that contains the size of storage (in bytes) available for the address. You can then use the writable pointer to update this value to the amount of storage actually used. Typically one would copy the address into the memory returned by GetStorage() and then update the size used to the correct value by writing to the value returned from this function. Note that GetSize() will always return the maximum available storage, if you need to know the storage used then call IAddress.Size(). Calling GetSize() resets the size used to the maximum size available. Bleugh, but written so that this works: getsockname(socket, address.GetStorage(), address.GetSize()).

Implemented in CAddress, and CAddressImpl.

virtual IWritableAddressRef* GetWritableAddressRef (  )  const [pure virtual, inherited]

Returns a reference counted view on this address, be sure to call Release() on the IWritableAddressRef when you're done with it.

Implemented in CAddress, and CAddressImpl.

bool IsValid ( const IAddress address  )  [static, inherited]

bool IsSameAddress ( const IAddress lhs,
const IAddress rhs 
) [static, inherited]

virtual unsigned short Family (  )  const [pure virtual, inherited]

virtual const sockaddr& AsSockAddr (  )  const [pure virtual, inherited]

virtual int Size (  )  const [pure virtual, inherited]

Returns the size of the sockaddr structure required to store the address.

Implemented in CAddress, CAddressImpl, CAddressInfo::Iterator, CAddressIPv4, CAddressIPv6, CAddressWrapper, CFullAddress, CFullAddressWrapper, and CNetworkInterfaceAddresses::Iterator.

virtual IAddressRef* GetAddressRef (  )  const [pure virtual, inherited]

Returns a reference counted view on this address, be sure to call Release() on the IAdressRef when you're done with it.

Implemented in CAddress, CAddressImpl, CAddressInfo::Iterator, CAddressIPv4, CAddressIPv6, CAddressWrapper, CFullAddress, CFullAddressWrapper, and CNetworkInterfaceAddresses::Iterator.


Generated on Sun Sep 12 19:10:31 2021 for The Server Framework - v7.4 by doxygen 1.5.3