Minor update
this client will no longer display TEXT messages from just any async commands. instead it will now display TEXT from ASYNC_RDY and ASYNC_CAST only.
This commit is contained in:
parent
347e01eeff
commit
a98a6af736
|
@ -82,7 +82,7 @@ notes:
|
||||||
* reply = 2, means the client is acceptable but the host will now send it's Pem formatted SSL cert data in a ```HOST_CERT``` mrci frame just after sending it's header. After receiving the cert, the client will then need to send a STARTTLS signal using this cert.
|
* reply = 2, means the client is acceptable but the host will now send it's Pem formatted SSL cert data in a ```HOST_CERT``` mrci frame just after sending it's header. After receiving the cert, the client will then need to send a STARTTLS signal using this cert.
|
||||||
* reply = 4, means the host was unable to find the SSL cert associated with the common name sent by the client. The session will auto close at this point.
|
* reply = 4, means the host was unable to find the SSL cert associated with the common name sent by the client. The session will auto close at this point.
|
||||||
|
|
||||||
* **major**, **minor**, **tcp_rev**, **mod_rev** these 4 numeric values are the host version number that uses a 4 number versioning system. This can be used by the client to setup backwards compatibility or determine of if supports the host at all. If not supported, the client can simply disconnect form the host and display an error to the user.
|
* **major**, **minor**, **tcp_rev**, **mod_rev** these 4 numeric values are the host version number that uses a 4 number versioning system. This can be used by the client to setup backwards compatibility or determine if it supports the host at all. If not supported, the client can simply disconnect from the host and display an error to the user.
|
||||||
|
|
||||||
* **sesId** is the session id. It is a unique 224bit sha3 hash that can be used by the host and client to uniquely identify the current session or past sessions.
|
* **sesId** is the session id. It is a unique 224bit sha3 hash that can be used by the host and client to uniquely identify the current session or past sessions.
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ Connect::Connect(QObject *parent) : Command(parent)
|
||||||
Shared::clientCmds->insert(objectName(), this);
|
Shared::clientCmds->insert(objectName(), this);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Connect::shortText() {return tr("connect a MRCI host.");}
|
QString Connect::shortText() {return tr("connect to a MRCI host.");}
|
||||||
QString Connect::ioText() {return tr("[-addr (text) -port (text) {-save (bookmark)}] or [-load (bookmark)]/[text]");}
|
QString Connect::ioText() {return tr("[-addr (text) -port (text) {-save (bookmark)}] or [-load (bookmark)]/[text]");}
|
||||||
QString Connect::longText() {return TXT_Connect;}
|
QString Connect::longText() {return TXT_Connect;}
|
||||||
|
|
||||||
|
|
|
@ -290,15 +290,16 @@ void wordWrap(const QString &label, QTextStream &txtOut, const QString &txtIn, Q
|
||||||
// breaking mid-word and also honors line breaks by treating
|
// breaking mid-word and also honors line breaks by treating
|
||||||
// lines with line breaks as complete text bodies.
|
// lines with line breaks as complete text bodies.
|
||||||
|
|
||||||
int width = measureWid->width() / 8;
|
auto width = measureWid->width() / 8;
|
||||||
bool labelWr = true;
|
auto labelWr = true;
|
||||||
QString indent = QString(label.size(), ' ');
|
auto indent = QString(label.size(), ' ');
|
||||||
QStringList textBodies = txtIn.split('\n');
|
auto textBodies = txtIn.split('\n');
|
||||||
|
|
||||||
for (int i = 0; i < textBodies.size(); ++i)
|
for (int i = 0; i < textBodies.size(); ++i)
|
||||||
{
|
{
|
||||||
int index = 0;
|
auto index = 0;
|
||||||
QStringList words = textBodies[i].split(' ');
|
auto words = textBodies[i].split(' ');
|
||||||
|
|
||||||
QString line;
|
QString line;
|
||||||
|
|
||||||
while(index < words.size())
|
while(index < words.size())
|
||||||
|
|
|
@ -76,7 +76,7 @@
|
||||||
#define CONFIG_FILENAME "config_v3.json"
|
#define CONFIG_FILENAME "config_v3.json"
|
||||||
#define APP_NAME "Cmdr"
|
#define APP_NAME "Cmdr"
|
||||||
#define APP_TARGET "cmdr"
|
#define APP_TARGET "cmdr"
|
||||||
#define APP_VERSION "3.1"
|
#define APP_VERSION "3.2"
|
||||||
|
|
||||||
enum TypeID : quint8
|
enum TypeID : quint8
|
||||||
{
|
{
|
||||||
|
|
|
@ -242,15 +242,28 @@ bool Session::isAsync(quint16 id)
|
||||||
|
|
||||||
void Session::procAsync(const QByteArray &data)
|
void Session::procAsync(const QByteArray &data)
|
||||||
{
|
{
|
||||||
if ((dType == TEXT) || (dType == BIG_TEXT) || (dType == ERR))
|
if (cmdId == ASYNC_CAST)
|
||||||
|
{
|
||||||
|
if (dType == TEXT)
|
||||||
|
{
|
||||||
|
cacheTxt(dType, "\ncast_text: " + fromTEXT(data) + "\n");
|
||||||
|
}
|
||||||
|
else if (dType == BIG_TEXT)
|
||||||
|
{
|
||||||
|
QString txt;
|
||||||
|
QTextStream stream(&txt);
|
||||||
|
|
||||||
|
wordWrap("cast_text: ", stream, fromTEXT(data), Shared::mainWidget);
|
||||||
|
cacheTxt(TEXT, "\n");
|
||||||
|
cacheTxt(TEXT, txt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (cmdId == ASYNC_RDY)
|
||||||
{
|
{
|
||||||
cacheTxt(dType, fromTEXT(data));
|
cacheTxt(dType, fromTEXT(data));
|
||||||
|
|
||||||
if (cmdId == ASYNC_RDY)
|
|
||||||
{
|
|
||||||
hook = 0;
|
hook = 0;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if (cmdId == ASYNC_SYS_MSG)
|
else if (cmdId == ASYNC_SYS_MSG)
|
||||||
{
|
{
|
||||||
if (dType == HOST_CERT)
|
if (dType == HOST_CERT)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user