+//
+// Discard any data still in the input buffer.
+// This is used to cope with unexpected garbage (protocol violations
+// from the server), and shouldn't be used indiscriminately.
+//
+void TransferEngine::Client::flushInput()
+{
+ if (!mReadBuffer.isEmpty()) {
+ debug("engineio", "flushing %ld bytes of input", mReadBuffer.length());
+ mReadBuffer.clear();
+ mInputFlushed = true; // inhibit normal buffer ops
+ }
+}
+
+