32 for (
int i = 1; i < 7; ++i ) {
33 pthread_mutex_lock( &m_rpcLock );
35 m_rpc->setData(pevt, size);
36 int inCode = m_rpc->getInt();
38 pthread_mutex_unlock( &m_rpcLock );
45 std::cout <<
"[NetDataWriter] Event " << nn <<
" timeout. Sleep " << sec <<
"s before retry." << std::endl;
47 std::cout <<
"[NetDataWriter] Event " << nn <<
" now retry time " << i <<
" ..." << std::endl;
52 throw RawExMessage(
"[NetDataWriter] Failed to retry server. Stop this client!");
57 throw RawExMessage(
"[NetDataWriter] Received server ERROR code!");
61 throw RawExMessage(
"[NetDataWriter] Unknown server code!");