// OutStream::ShutdownHandler implementation virtual void onShutdown(bool success) { printf("Shut down %s.\n", (success) ? "successfully" : "failed"); if (os.isValid() && !success) os.reset(); server.removeConnection(this); delete this; }
virtual void onReset() { // (InStream OR OutStream reset) printf("Reset.\n"); is.reset(); if (os.isValid()) os.reset(); server.removeConnection(this); }