Language:

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

:: osl ::

class Socket


Base Classes
None.
Known Derived Classes
StreamSocket
AcceptorSocket
DatagramSocket

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

Public Members

Methods


Socket( );

Socket( const Socket & socket );

Socket( oslSocket socketHandle );

Socket( oslSocket socketHandle, __sal_NoAcquire noacquire );

~Socket( );
Destructor. Releases the underlying handle
Socket &
operator=( oslSocket socketHandle );
Assignment operator. If socket was already created, the old one will be discarded.
Socket &
operator=( const Socket & sock );
Assignment operator. If socket was already created, the old one will be discarded.
sal_Bool
operator==( const Socket & rSocket ) const;
sal_Bool
operator==( const oslSocket socketHandle ) const;
void
shutdown( oslSocketDirection Direction = osl_Socket_DirReadWrite );
Closes a definite direction of the bidirectional stream
void
close( );
void
getLocalAddr( SocketAddr & Addr ) const;
Retrieves the address of the local interface of this socket.
sal_Int32
getLocalPort( ) const;
Get the local port of the socket.
::rtl::OUString
getLocalHost( ) const;
Get the hostname for the local interface.
void
getPeerAddr( SocketAddr & Addr ) const;
Retrieves the address of the remote host of this socket.
sal_Int32
getPeerPort( ) const;
Get the remote port of the socket.
::rtl::OUString
getPeerHost( ) const;
Get the hostname for the remote interface.
sal_Bool
bind( const SocketAddr & LocalInterface );
Binds the socket to the specified (local) interface.
sal_Bool
isRecvReady( const TimeValue * pTimeout = 0 ) const;
sal_Bool
isSendReady( const TimeValue * pTimeout = 0 ) const;
sal_Bool
isExceptionPending( const TimeValue * pTimeout = 0 ) const;
oslSocketType
getType( ) const;
Queries the socket for its type.
sal_Int32
getOption( oslSocketOption Option, void * pBuffer, sal_uInt32 BufferLen, oslSocketOptionLevel Level = osl_Socket_LevelSocket ) const;
Retrieves option-attributes associated with the socket.
sal_Bool
setOption( oslSocketOption Option, void * pBuffer, sal_uInt32 BufferLen, oslSocketOptionLevel Level = osl_Socket_LevelSocket ) const;
Sets the sockets attributes.
sal_Bool
setOption( oslSocketOption option, sal_Int32 nValue );
Convenience function for setting sal_Bool and sal_Int32 option values.
sal_Int32
getOption( oslSocketOption option ) const;
Convenience function for retrieving sal_Bool and sal_Int32 option values.
sal_Bool
enableNonBlockingMode( sal_Bool bNonBlockingMode );
Enables/disables non-blocking mode of the socket.
sal_Bool
isNonBlockingMode( ) const;
Query blocking mode of the socket.
void
clearError( ) const;
Gets clears the error status @returns the current error state.
oslSocketError
getError( ) const;
Delivers a constant decribing the last error for the socket system.
::rtl::OUString
getErrorAsString( ) const;
Builds a string with the last error-message for the socket.
oslSocket
getHandle( ) const;
Returns the underlying handle unacquired (The caller must acquire it to keep it)

Protected Members

Methods


Socket( oslSocketType Type, oslAddrFamily Family = osl_Socket_FamilyInet, oslProtocol Protocol = osl_Socket_ProtocolIp );
Creates a socket.

Data

oslSocket m_handle;

Top of Page

Apache Events

Apache Software Foundation

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

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