EMA C++ Developers Guide : 3 OMM Containers and Messages : 3.4 Working with OMM Messages : 3.4.3 Example: Working with the TunnelStreamRequest Class
 
3.4.3 Example: Working with the TunnelStreamRequest Class
The following code snippet demonstrates using the TunnelStreamRequest class in the consumer application to open a tunnel stream.
 
 
CosAuthentication cosAuthentication;
cosAuthentication.type( CosAuthentication::OmmLoginEnum );
 
CosDataIntegrity cosDataIntegrity;
cosDataIntegrity.type( CosDataIntegrity::ReliableEnum );
 
CosFlowControl cosFlowControl;
cosFlowControl.type( CosFlowControl::BidirectionalEnum ).recvWindowSize( 1200
).sendWindowSize( 1200 );
 
ClassOfService cos;
cos.authentication( cosAuthentication ).dataIntegrity( cosDataIntegrity ).flowControl(
cosFlowControl );
 
TunnelStreamRequest tsr;
tsr.classOfService( cos ).domainType( MMT_SYSTEM ).name( "TUNNEL" ).serviceName( "DIRECT_FEED" );