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

Go to the source code of this file.

Functions

bool phoenix_createMockBackend (PMockSocketFile &mock, const PSocketParam &socketParam, const std::string &prefix, const PMockParamFile &extraParam)
 Create a mock backend file.
 

Function Documentation

◆ phoenix_createMockBackend()

bool phoenix_createMockBackend ( PMockSocketFile & mock,
const PSocketParam & socketParam,
const std::string & prefix,
const PMockParamFile & extraParam )

Create a mock backend file.

Parameters
[out]mock: mock socket file 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 PMockBackendFile.cpp.

19 {
20 mock.setIsMockRecord(true);
21 bool b = mock.createClientSocket(socketParam, extraParam);
22 mock.setMockPrefix(prefix);
23 return b;
24}
void setMockPrefix(const std::string &mockPrefix)
Set the mock prefix (where to find/save it)
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)

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

+ Here is the call graph for this function: