Methods of Class SocketAddr
- SocketAddr
- SocketAddr();
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- Creates socket address of unknown type.
- SocketAddr
- SocketAddr(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- Copy constructor.
- SocketAddr
- SocketAddr(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- The SocketAddr takes over the responsibility of the handle ( which means,
that the handle gets destructed by the destructor of this reference)
- Parameters
-
- SocketAddr
- SocketAddr(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- Copyconstructs the oslSocketAddr handle.
- SocketAddr
- SocketAddr(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- tcpip-specif constructor.
- Parameters
strAddrOrHostName |
strAddrOrHostName hostname or dotted ip-number of the network
interface, the socket shall be created on.
|
nPort |
tcp-ip port number
|
- ~SocketAddr
- ~SocketAddr();
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- destroys underlying oslSocketAddress
- is
- sal_Bool is();
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- checks, if the SocketAddr was created successful.
- Return
sal_True
if there is a valid underlying handle,
otherwise sal_False.
- getHostname
- ::rtl::OUString getHostname(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Summary
- Converts the address to a (human readable) domain-name.
- Parameters
pResult |
0, if you are not interested in errors,
otherwise *pResult contains an error code on failure
or osl_Socket_Ok on success
|
- Return
- the hostname of this SocketAddr or an empty string on failure.
- See Also
- osl_getHostnameOfSocketAddr()
- setHostname
- sal_Bool setHostname(
const ::rtl::OUString & |
sDottedIpOrHostname ); |
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- Sets the ipaddress or hostname of the SocketAddress
- getPort
- sal_Int32 getPort();
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- Returns the port number of the address.
- Return
- the port in host-byte order or or OSL_INVALID_PORT on errors.
- setPort
- sal_Bool setPort(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- Sets the port number of the address.
- Return
- true if successfule.
- setAddr
- sal_Bool setAddr(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- Sets the address of the underlying socket address struct in network byte order.
- Return
- true on success, false signales falure.
- getAddr
- ::rtl::ByteSequence getAddr(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Summary
- Returns the address of the underlying socket in network byte order
- operator=
- SocketAddr & operator=(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- assign the handle to this reference. The previous handle is released.
- operator=
- SocketAddr & operator=(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- assign
- SocketAddr & assign(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- Assigns the socket addr without copyconstructing it.
- Parameters
-
- operator==
- sal_Bool operator==(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Summary
- Returns true if the underlying handle is identical to the Addr handle.
- operator==
- sal_Bool operator==(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Summary
- Returns true if the underlying handle is identical to the Addr handle.
- getHandle
- oslSocketAddr getHandle();
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- Returns the underlying SocketAddr handle without copyconstructing it.
- getLocalHostname
- static ::rtl::OUString getLocalHostname(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
YES |
YES |
NO |
- Summary
- Get the hostname for the local interface.
- Parameters
after |
the call *pResult contains osl_Socket_Ok on success or
an error on failure.
|
- Return
- the hostname
- resolveHostname
- static void resolveHostname(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
YES |
YES |
NO |
- Summary
- Tries to find an address for a host.
- See Also
- osl_resolveHostname()
- Return
- A new created socket-address or 0 if the name could not be found.
- getServicePort
- static sal_Int32 getServicePort(
const ::rtl::OUString & |
strServiceName, |
const ::rtl::OUString & |
strProtocolName = :: rtl :: OUString :: createFromAscii "tcp" ); |
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
YES |
YES |
NO |
- Summary
- Tries to find the port associated with the given service/protocol-
pair (e.g. "ftp"/"tcp").
- Return
- the port number in host-byte order or
OSL_INVALID_PORT
if no service/protocol pair could be found.
Top of Page
Copyright © 2012, The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache, the Apache feather logo, Apache OpenOffice and OpenOffice.org are trademarks of The Apache Software Foundation. Other names may be trademarks of their respective owners.