B2BITS CME MDP Handler API Reference
Static Public Member Functions | List of all members
MockPlayer Class Reference

Emulates incoming UDP messages. More...

#include <B2BITS_CmeMdpMockPlayer.h>

Static Public Member Functions

static void playPcap (std::string const &fileName, u32 playMsgsCount=0)
 Replays pcap file. More...
 
static bool pushUdpMessage (u32 ip, u16 port, char const *buffer, std::size_t bufSize)
 Delivers given UDP message into Market Data Service. More...
 

Detailed Description

Following parameters must be set for Market Data Service:

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

Member Function Documentation

static void playPcap ( std::string const &  fileName,
u32  playMsgsCount = 0 
)
static
Parameters
fileNamePath to the PCAP file
playMsgsCountNUmber of messages to replay. 0 means all messages.
static bool pushUdpMessage ( u32  ip,
u16  port,
char const *  buffer,
std::size_t  bufSize 
)
static
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.