Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.11
 Overview   Namespace   Class   Index   Help 
PUBLIC MEMBERS:  CLASSESSTRUCTSUNIONSENUMSTYPEDEFSMETHODSSTATIC METHODSDATASTATIC DATA
PROTECTED MEMBERS:  CLASSESSTRUCTSUNIONSENUMSTYPEDEFSMETHODSSTATIC METHODSDATASTATIC DATA

:: osl ::

class SocketAddr


Base Classes
None.
Known Derived Classes
None.

virtual abstract interface template
NO NO NO NO
File
socket_decl.hxx

Public Members

Methods


SocketAddr( );
Creates socket address of unknown type.

SocketAddr( const SocketAddr & Addr );
Copy constructor.

SocketAddr( const oslSocketAddr , __osl_socket_NoCopy nocopy );
The SocketAddr takes over the responsibility of the handle ( which means, that the handle gets destructed by the destructor of this reference)

SocketAddr( oslSocketAddr Addr );

SocketAddr( const ::rtl::OUString & strAddrOrHostName, sal_Int32 nPort );
tcpip-specif constructor.

~SocketAddr( );
destroys underlying oslSocketAddress
sal_Bool
is( ) const;
checks, if the SocketAddr was created successful.
::rtl::OUString
getHostname( oslSocketResult * pResult = 0 ) const;
Converts the address to a (human readable) domain-name.
sal_Bool
setHostname( const ::rtl::OUString & sDottedIpOrHostname );
sal_Int32
getPort( ) const;
Returns the port number of the address.
sal_Bool
setPort( sal_Int32 nPort );
Sets the port number of the address.
sal_Bool
setAddr( const ::rtl::ByteSequence & address );
Sets the address of the underlying socket address struct in network byte order.
::rtl::ByteSequence
getAddr( oslSocketResult * pResult = 0 ) const;
Returns the address of the underlying socket in network byte order
SocketAddr &
operator=( oslSocketAddr Addr );
assign the handle to this reference. The previous handle is release.
SocketAddr &
operator=( const SocketAddr & Addr );
SocketAddr &
assign( oslSocketAddr Addr, __osl_socket_NoCopy nocopy );
Assigns the socket addr without copyconstructing it.
sal_Bool
operator==( oslSocketAddr Addr ) const;
Returns true if the underlying handle is identical to the Addr handle.
sal_Bool
operator==( const SocketAddr & Addr ) const;
Returns true if the underlying handle is identical to the Addr handle.
oslSocketAddr
getHandle( ) const;
Returns the underlying SocketAddr handle without copyconstructing it.

Static Methods

static ::rtl::OUString
getLocalHostname( oslSocketResult * pResult = 0 );
Get the hostname for the local interface.
static void
resolveHostname( const ::rtl::OUString & strHostName, SocketAddr & Addr );
Tries to find an address for a host.
static sal_Int32
getServicePort( const ::rtl::OUString & strServiceName, const ::rtl::OUString & strProtocolName = :: rtl :: OUString :: createFromAscii "tcp" );
Tries to find the port associated with the given service/protocol- pair (e.g. "ftp"/"tcp").

Protected Members

Data

oslSocketAddr m_handle;

Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.