X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fcorenetwork.h;h=777152794ae4345402e09cfbc672cb2731c4c405;hb=28107860d0c324fa015477299853c4060bb5403e;hp=5a41b983bf6dd138d6452472183c72d873066f84;hpb=418f497d996892ec16a31d3e282c4996e8677b3a;p=quassel.git diff --git a/src/core/corenetwork.h b/src/core/corenetwork.h index 5a41b983..77715279 100644 --- a/src/core/corenetwork.h +++ b/src/core/corenetwork.h @@ -98,6 +98,15 @@ public: inline quint16 localPort() const { return socket.localPort(); } inline quint16 peerPort() const { return socket.peerPort(); } + /** + * Gets whether or not a disconnect was expected. + * + * Distinguishes desired quits from unexpected disconnections such as socket errors or timeouts. + * + * @return True if disconnect was requested, otherwise false. + */ + inline bool disconnectExpected() const { return _disconnectExpected; } + QList> splitMessage(const QString &cmd, const QString &message, std::function(QString &)> cmdGenerator); public slots: