Echo request and reply message lib
Coming soon (ICMP)
Listener listener = NewMockListener();
StartListening(listener); // Sync
DestroyListener(&listener);
Currently echo doesn't implement any communication protocol, and for that reason a mock is being used
mkdir obj
make
cd tests
python3 run_tests.py
cd tests
python3 run_static_check.py
Any idea or improvement is welcome. Feel free to branch and Pull Request for contributions, just, please, don't commit directly to develop or main histories. You can also get in contact with 'lohan.chuan123@gmail.com' or fork the repository.
The following must be implemented to add echo
a new protocol type
New<PROTOCOL>Listener
(macro)<PROTOCOL>StartReceiving
(function)<PROTOCOL>Flush
(function)
#define NewMockListener() NewListener(&MockStartReceiving, &MockFlush)
/********************************************************************
* This function receives a message and forwards to Listener
*
* Outputs:
* - Message
********************************************************************/
Message MockStartReceiving();
/********************************************************************
* This function flushes a message to an output
*
* Inputs:
* - Message
********************************************************************/
void MockFlush(Message message);