OW_NAMESPACE::SocketUtils Namespace Reference


Functions

String inetAddrToString (UInt64 addr)
int waitForIO (SocketHandle_t fd, int timeOutSecs, SocketFlags::EWaitDirectionFlag forInput)
 Wait for input or output on a socket.
String getFullyQualifiedHostName ()
 Get the fully qualified host name.


Function Documentation

OW_COMMON_API String OW_NAMESPACE::SocketUtils::getFullyQualifiedHostName  ) 
 

Get the fully qualified host name.

This function can be expensive performance-wise. It may query multiple DNS servers. If the network is not working correctly, it will fail and throw an exception.

Exceptions:
SocketException on failure.

Definition at line 258 of file OW_SocketUtils.cpp.

References OW_NAMESPACE::gethostbynameMutex, i, and OW_THROW.

OW_COMMON_API String OW_NAMESPACE::SocketUtils::inetAddrToString UInt64  addr  ) 
 

Definition at line 81 of file OW_SocketUtils.cpp.

References s.

Referenced by OW_NAMESPACE::NwIface::getBroadcastAddressString(), OW_NAMESPACE::NwIface::getIPAddressString(), and OW_NAMESPACE::NwIface::getNetmaskString().

int OW_NAMESPACE::SocketUtils::waitForIO SocketHandle_t  fd,
int  timeOutSecs,
SocketFlags::EWaitDirectionFlag  forInput
 

Wait for input or output on a socket.

Parameters:
fd the handle of the socket to wait on.
timeOutSecs the number of seconds to wait.
forInput true if we are waiting for input.
Returns:
zero if we got input before the timeout expired, -1 on error, and ETIMEDOUT on timeout.

Definition at line 180 of file OW_SocketUtils.cpp.

References OW_NAMESPACE::IntrusiveReference< T >::cast_to(), OW_NAMESPACE::SocketFlags::E_WAIT_FOR_INPUT, OW_NAMESPACE::SocketFlags::E_WAIT_FOR_OUTPUT, ETIMEDOUT, OW_NAMESPACE::Socket::getShutDownMechanism(), OW_ASSERT, OW_NAMESPACE::Array< T >::push_back(), OW_NAMESPACE::Select::SELECT_TIMEOUT, OW_NAMESPACE::Select::selectRW(), OW_NAMESPACE::Select::SelectObject::waitForRead, and OW_NAMESPACE::Select::SelectObject::waitForWrite.

Referenced by OW_NAMESPACE::ServerSocketImpl::accept(), OW_NAMESPACE::PosixUnnamedPipe::read(), OW_NAMESPACE::SocketBaseImpl::waitForInput(), OW_NAMESPACE::ServerSocketImpl::waitForIO(), OW_NAMESPACE::SocketBaseImpl::waitForOutput(), and OW_NAMESPACE::PosixUnnamedPipe::write().


Generated on Thu Feb 9 09:18:00 2006 for openwbem by  doxygen 1.4.6