24 lines
466 B
C++
Executable File
24 lines
466 B
C++
Executable File
|
|
|
|
|
|
#include "cbi_pingpong.h"
|
|
|
|
CBI_PingPong::CBI_PingPong(unsigned short port)
|
|
: CommandInterface(port, "PING")
|
|
{}
|
|
|
|
void CBI_PingPong::handleCommandInternal(const QVector<QByteArray> &args)
|
|
{
|
|
writeData("PONG");
|
|
for (const QByteArray &ba : args)
|
|
{
|
|
writeData(" ");
|
|
writeData(quote(ba.constData()));
|
|
}
|
|
}
|
|
|
|
QString CBI_PingPong::help() const
|
|
{
|
|
return QString::fromUtf8("PING <input> - mirror the Input and send the data back");
|
|
}
|