Files
qt6-migration-pipeline/Z/src/tcpserver/cbi_pingpong.cpp
T
2026-07-14 12:07:36 +02:00

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");
}