indent() << argsname << " __args;" << endl <<
indent() << "__args.read(_iprot, itrans);" << endl <<
indent() << "_iprot->readMessageEnd(itrans);" << endl <<
+ indent() << "itrans->readEnd();" << endl <<
endl;
t_struct* xs = tfunction->get_xceptions();
indent() << "_oprot->writeMessageBegin(otrans, \"" << tfunction->get_name() << "\", facebook::thrift::protocol::T_REPLY, seqid);" << endl <<
indent() << "__result.write(_oprot, otrans);" << endl <<
indent() << "_oprot->writeMessageEnd(otrans);" << endl <<
- indent() << "otrans->flush();" << endl;
+ indent() << "otrans->flush();" << endl <<
+ indent() << "otrans->writeEnd();" << endl;
// Close function
scope_down(f_service_);
return have;
}
+ /**
+ * Called when read is completed.
+ * This can be over-ridden to perform a transport-specific action
+ * e.g. logging the request to a file
+ *
+ */
+ virtual void readEnd() {
+ // default behaviour is to do nothing
+ return;
+ }
+
/**
* Writes the string in its entirety to the buffer.
*
throw TTransportException(TTX_NOT_OPEN, "Base TTransport cannot write.");
}
+ /**
+ * Called when write is completed.
+ * This can be over-ridden to perform a transport-specific action
+ * at the end of a request.
+ *
+ */
+ virtual void writeEnd() {
+ // default behaviour is to do nothing
+ return;
+ }
+
/**
* Flushes any pending data to be written. Typically used with buffered
* transport mechanisms.