SourcePro® 2023.1 |
SourcePro® API Reference Guide |
Abstract class that builds socket addresses. More...
#include <rw/network/RWSockAddrFactoryBase.h>
Public Member Functions | |
virtual | ~RWSockAddrFactoryBase () |
virtual RWSockAddrBase * | operator() (struct sockaddr *addr, RWSockLenType addrLen) const =0 |
virtual RWSockAddrBase * | operator() (struct sockaddr *addr, RWSockLenType addrLen, int type) const =0 |
virtual RWSockAddrBase * | operator() (const RWCString &str) const =0 |
RWSockAddrFactoryBase is an abstract class that builds socket addresses. It represents the concept of an object that can build socket addresses from either an input string or from the C API representation.
|
virtual |
Destroys self.
|
pure virtual |
Returns a pointer to an RWSockAddrBase derived object constructed from the provided sockaddr
.
The addr parameter is expected to point to a concrete socket address type appropriate for this factory. For instance, a factory for creating RWInetAddr instances would expect addr to be a pointer to sockaddr_in
.
The addrLen parameter is expected to describe the size, in bytes, of the object pointed to by addr.
The newly created RWSockAddrBase is allocated on the heap. The caller is responsible for deleting it. Often, this is managed by wrapping the object using an RWSockAddr.
Implemented in RWSockAddrFactory, RWInetAddrFactory, and RWInet6AddrFactory.
|
pure virtual |
Returns a pointer to an RWSockAddrBase derived object constructed from the provided sockaddr
.
The addr parameter is expected to point to a concrete socket address type appropriate for this factory. For instance, a factory for creating RWInetAddr instances would expect addr to be a pointer to sockaddr_in
.
The addrLen parameter is expected to describe the size, in bytes, of the object pointed to by addr.
The type parameter describes the type of socket address to be created. This would normally be one of SOCK_STREAM
or SOCK_DGRAM
.
The newly created RWSockAddrBase is allocated on the heap. The caller is responsible for deleting it. Often, this is managed by wrapping the object using an RWSockAddr.
Implemented in RWSockAddrFactory, RWInetAddrFactory, and RWInet6AddrFactory.
|
pure virtual |
Returns a pointer to an RWSockAddrBase derived object constructed from the provided RWCString.
The newly created RWSockAddrBase is allocated on the heap. The caller is responsible for deleting it. Often, this is managed by wrapping the object using an RWSockAddr.
Implemented in RWSockAddrFactory, RWInetAddrFactory, and RWInet6AddrFactory.
Copyright © 2023 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |