本文整理汇总了C++中TestApplication::getCount方法的典型用法代码示例。如果您正苦于以下问题:C++ TestApplication::getCount方法的具体用法?C++ TestApplication::getCount怎么用?C++ TestApplication::getCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TestApplication
的用法示例。
在下文中一共展示了TestApplication::getCount方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: testSendOnThreadedSocket
int testSendOnThreadedSocket( int count, short port )
{
std::stringstream stream;
stream
<< "[DEFAULT]" << std::endl
<< "SocketConnectHost=localhost" << std::endl
<< "SocketConnectPort=" << (unsigned short)port << std::endl
<< "SocketAcceptPort=" << (unsigned short)port << std::endl
<< "SocketReuseAddress=Y" << std::endl
<< "StartTime=00:00:00" << std::endl
<< "EndTime=00:00:00" << std::endl
<< "UseDataDictionary=N" << std::endl
<< "BeginString=FIX.4.2" << std::endl
<< "PersistMessages=N" << std::endl
<< "[SESSION]" << std::endl
<< "ConnectionType=acceptor" << std::endl
<< "SenderCompID=SERVER" << std::endl
<< "TargetCompID=CLIENT" << std::endl
<< "[SESSION]" << std::endl
<< "ConnectionType=initiator" << std::endl
<< "SenderCompID=CLIENT" << std::endl
<< "TargetCompID=SERVER" << std::endl
<< "HeartBtInt=30" << std::endl;
FIX::ClOrdID clOrdID( "ORDERID" );
FIX::HandlInst handlInst( '1' );
FIX::Symbol symbol( "LNUX" );
FIX::Side side( FIX::Side_BUY );
FIX::TransactTime transactTime;
FIX::OrdType ordType( FIX::OrdType_MARKET );
FIX42::NewOrderSingle message( clOrdID, handlInst, symbol, side, transactTime, ordType );
FIX::SessionID sessionID( "FIX.4.2", "CLIENT", "SERVER" );
TestApplication application;
FIX::MemoryStoreFactory factory;
FIX::SessionSettings settings( stream );
FIX::ThreadedSocketAcceptor acceptor( application, factory, settings );
acceptor.start();
FIX::ThreadedSocketInitiator initiator( application, factory, settings );
initiator.start();
FIX::process_sleep( 1 );
int start = GetTickCount();
for ( int i = 0; i <= count; ++i )
FIX::Session::sendToTarget( message, sessionID );
while( application.getCount() < count )
FIX::process_sleep( 0.1 );
int ticks = GetTickCount() - start;
initiator.stop();
acceptor.stop();
return ticks;
}