EPAM B2BITS CME MDP Handler C++  5.4.2
Static Public Member Functions | List of all members
Cme::Mdp::MockPlayer Class Reference

#include <B2BITS_CmeMdpMockPlayer.h>

Static Public Member Functions

static void playPcap (std::string const &fileName, u32 playMsgsCount=0)
 
static bool pushUdpMessage (u32 ip, u16 port, char const *buffer, std::size_t bufSize)
 

Detailed Description

Emulates incoming UDP messages. Following parameters must be set for Market Data Service:

  1. MarketDataServiceOptions::recoverySocketOptions_::socketType_ = stMock
  2. MarketDataServiceOptions::.incrementalSocketOptions_::socketType_ = stMock

Member Function Documentation

static void Cme::Mdp::MockPlayer::playPcap ( std::string const &  fileName,
u32  playMsgsCount = 0 
)
static

Replays pcap file

Parameters
fileNamePath to the PCAP file
playMsgsCountNUmber of messages to replay. 0 means all messages.
static bool Cme::Mdp::MockPlayer::pushUdpMessage ( u32  ip,
u16  port,
char const *  buffer,
std::size_t  bufSize 
)
static

Delivers given UDP message into Market Data Service

Parameters
ipIPv4 address (in_addr.s_addr)
portUDP port
bufferPointer to UDP message
bufSizeSize of given UDP message
Returns
true if message was delivered; false if connection was not opened by Market Data Service.