Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 0 libSystem.B.dylib 0x00007fff85434e4e __semwait_signal_nocancel + 10
- 1 libSystem.B.dylib 0x00007fff85434d50 nanosleep$NOCANCEL + 129
- 2 libSystem.B.dylib 0x00007fff854916ae usleep$NOCANCEL + 57
- 3 libSystem.B.dylib 0x00007fff854b0ce0 abort + 93
- 4 libSystem.B.dylib 0x00007fff853c86b5 free + 128
- 5 y.exe 0x0000000100013bcb std::string::_Rep::_M_destroy(std::allocator<char> const&) + 39
- 6 y.exe 0x0000000100001d48 boost::system::system_error::~system_error() + 54
- 7 x.dylib 0x000000010310aab0 Sockets::SocketBase<boost::asio::ip::tcp>::ThrowOnError(boost::system::error_code const&) + 248
- 8 x.dylib 0x00000001030e95c6 Sockets::TCPClientSocket::ReceiveBytes(char*, unsigned int, unsigned int) + 2700
- bool Socket::ThrowOnError( const boost::system::error_code& socketError )
- {
- try
- {
- if ( socketError )
- {
- switch( socketError.value( ) )
- {
- case boost::asio::error::operation_aborted: // canceled
- return true;
- case boost::asio::error::eof:
- case boost::asio::error::connection_reset:
- case boost::asio::error::network_reset:
- {
- m_socket.close( );
- throw SocketClosed( socketError );
- }
- default:
- throw boost::system::system_error( socketError );
- }
- }
- return false;
- }
- MACRO_CATCH_AND_RETHROW( SocketClosed )
- MACRO_CATCH_AND_RETHROW( boost::system::system_error )
- }
- unsigned int Socket::ReceiveBytes( char* pDestinationBuffer,
- unsigned int bufferLengthBytes,
- unsigned int timeoutMsecs /* = DEFAULT_RECEIVE_TIMEOUT */ )
- {
- try
- {
- //Asynchronous socket receive logic
- if ( ThrowOnError( m_receiveError ) )
- {
- // operation canceled
- return 0;
- }
- if ( m_readBytes == 0 )
- {
- throw SocketClosed( );
- }
- return m_readBytes;
- }
- MACRO_CATCH_AND_RETHROW( SocketClosed )
- MACRO_CATCH_AND_RETHROW( ReceiveTimedOut )
- catch( boost::system::system_error& ex )
- {
- throw ReceiveFailed( ex );
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment