AWE::Socket::Error::_t Socket::closeSocket() { int iResult( ::close( m_kSocket ) ); m_kSocket = AWE_INVALID_SOCKET; if ( iResult != 0 ) { return convertNativeError( iResult ); } return Error::Error_Success; }
AWE::Socket::Error::_t Socket::setNonBlocking( bool bNonBlocking ) { char cNonBlocking( (char)bNonBlocking ); // a value of 1 for cNonBlocking will activate non-blocking mode int iResult = ::ioctl( m_kSocket, FIONBIO, (char *)&cNonBlocking ); if ( iResult < 0 ) { return convertNativeError( iResult ); } return Error::Error_Success; }
//! Construct exception with native error code \c inCode and message \c inMessage. explicit Exception(int inCode, const string& inMessage) : runtime_error(inMessage), mNativeCode(inCode) {mCode = convertNativeError(inCode);}