Generalize the transmit code, so it can be used for both req.* and
resp.*

Submitted by: jonathan.huot@thomsonreuters.com