[Quickfix-users] Qs re: bool SocketConnection::read( SocketConnector& s )
Brought to you by:
orenmnero
|
From: Brendan B. B. <br...@ka...> - 2004-01-30 19:57:51
|
Hello,
I finally had a chance to begin looking @ QuickFIX v1.6.0 and had a
couple of questions regarding
bool SocketConnection::read( SocketConnector& s ).
a. as SocketConnection::readMessage()
calls Parser::readFixMessage
calls readFromStream() which can throw a RecvFailed,
shouldn't there be a catch for RecvFailed ala
bool SocketConnection::read( SocketAcceptor& a, SocketServer& s )?
b. Session::next( const std::string& msg ) can rethrow an
InvalidMessage so shouldn't it also be caught (as it did in QF 1.5.0)?
e.g.
bool SocketConnection::read( SocketConnector& s )
{
try
{
if ( !m_pSession ) return false;
std::string msg;
if ( !readMessage( msg ) ) return false;
m_pSession->next( msg );
return true;
}
catch ( InvalidMessage& )
{
return false;
}
catch ( RecvFailed& )
{
if ( !m_pSession->isLoggedOn() )
s.getMonitor().drop( m_socket );
return false;
}
}
Cheers,
Brendan
|