void AppClient::onRefreshMsg( const RefreshMsg& refreshMsg, const OmmConsumerEvent& event ) |
{ |
cout << “Received refresh message for item handle = “ << event.getHandle() << endl; |
cout << refreshMsg << endl; |
} |
try { |
AppClient client; |
OmmConsumer consumer( OmmConsumerConfig().host( "localhost:14002" ).username( "user" ) ); |
Int64 closure = 1; |
UInt64 itemHandle = consumer.registerClient( ReqMsg().serviceName( "DIRECT_FEED" ).name( |
"IBM.N" ), client, (void*)closure ); |
consumer.reissue( ReqMsg().serviceName( "DIRECT_FEED" ).name( "IBM.N" ).priority( 2, 2 ), |
itemHandle ); |
consumer.submit( PostMsg().payload( FieldList().addInt( 1, 100 ).complete() ), itemHandle |
); |
sleep( 60000 ); |
} catch ( const OmmException& excp ) { |
cout << excp << endl; |
} |