'Perform the necessary local to network newline conversion and escape
leading periods.
This method also resets the idle timeout so that as long as process is
being made sending the message body, the client will not time out.'

def transformChunk(self, chunk):

    self.resetTimeout()
    return chunk.replace('\n', '\r\n').replace('\r\n.', '\r\n..')
