Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Essential Networking Module Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

RWSockAddrFactory

Module:  Essential Networking Module   Package:  Networking


RWSockAddrFactoryRWSockAddrFactoryBase

Local Index

Members

Non-Members

Header File

#include <rw/network/RWSockAddrFactory.h>

Description

RWSockAddrFactory builds addresses of any registered type. This class is used by the Networking classes implementation and is not normally used explicitly. The global object rwSockAddrFactory is used by functions such as RWSocket::getsockname, which do not know the type of socket address to build.

Specific address factory objects need to be registered with the factory via the general factory's registerWithFactory() method. Check RWInetAddrFactory for an example of a specific address family factory.

These singleton objects are constructed when used, so they are not dependent on the order of static initialization.

Public Constructor

RWSockAddrFactory();

Public Destructor

virtual 
~RWSockAddrFactory();

Public Member Operators

virtual RWSockAddrBase* 
operator()(struct sockaddr *addr, int addrLen) const;
virtual RWSockAddrBase* 
operator()(struct sockaddr *addr, int addrLen, int type) 
           const;
virtual RWSockAddrBase* 
operator()(const RWCString& str) const;

Public Member Functions

void 
registerWithFactory(const RWSockType& family, 
                    RWSockAddrFactoryBase *factory);
void 
registerWithFactory(int family, 
                    RWSockAddrFactoryBase *factory);
void 
registerWithFactory(const RWCString& family, 
                    RWSockAddrFactoryBase *factory);
void 
unRegister(const RWSockType&);
void 
unRegister(int family);
void 
unRegister(const RWCString& family);

Static Member Function

static RWSockAddrFactory& 
theGlobalRWSockAddrFactory();

Global Reference

rwSockAddrFactory


Previous fileTop of DocumentContentsIndex pageNext file

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.