BLOCXX_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

String BLOCXX_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 267 of file SocketUtils.cpp.

References BLOCXX_GETHOSTBYNAME_R_ARGUMENTS, BLOCXX_THROW, and i.

String BLOCXX_NAMESPACE::SocketUtils::inetAddrToString UInt64  addr  ) 
 

Definition at line 91 of file SocketUtils.cpp.

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

int BLOCXX_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 190 of file SocketUtils.cpp.

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

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


Generated on Fri Jun 16 15:39:12 2006 for blocxx by  doxygen 1.4.6