PhoenixSocket  4.0.1
Library which integrates socket unix use in Phoenix
Loading...
Searching...
No Matches
PMockBackend.cpp File Reference
#include <sstream>
#include "data_stream_check_value.h"
#include "PMockBackend.h"
+ Include dependency graph for PMockBackend.cpp:

Go to the source code of this file.

Functions

bool phoenix_createMockBackend (PMockSocket &mock, const PSocketParam &socketParam, const std::string &prefix, const PMockParam &extraParam)
 Create a mock backend.
 

Function Documentation

◆ phoenix_createMockBackend()

bool phoenix_createMockBackend ( PMockSocket & mock,
const PSocketParam & socketParam,
const std::string & prefix,
const PMockParam & extraParam )

Create a mock backend.

Parameters
[out]mock: mock socket to be initialised
socketParam: parameters of the socket (hostname, port, etc)
prefix: prefix of the mock file
extraParam: extra parameters of the mock configuration
Returns
true on success, false otherwise

Definition at line 19 of file PMockBackend.cpp.

19 {
20 mock.setIsMockRecord(true);
21 bool b = mock.createClientSocket(socketParam, extraParam);
22 mock.setMockPrefix(prefix);
23 return b;
24}
bool createClientSocket(const PSocketParam &socketParam, const Param &extraParam)
Initialise a client socket.
void setIsMockRecord(bool isMockRecord)
Set the mock prefix (where to find/save it)
void setMockPrefix(const std::string &mockPrefix)
Set the mock prefix (where to find/save it)

References PMockSocket::createClientSocket(), PMockSocket::setIsMockRecord(), and PMockSocket::setMockPrefix().

+ Here is the call graph for this function: