def _startRelay(self, client):
        process = client.transport.connector.process
        # Relay any buffered data that was received from the process before
        # we got connected and started relaying.
        for _, data in process.data:
            client.dataReceived(data)
        process.protocol = client

        @process._endedDeferred.addBoth
        def stopRelay(reason):
            """Stop relaying data. Called when the process has ended.
            """
            relay = client.transport
            relay.loseConnection(reason)
            connector = relay.connector
            connector.connectionLost(reason)

        # Pass through the client protocol.
        return client
Start relaying data between the process and the protocol.
dataset/ETHPy150Open sporsh/carnifex/carnifex/endpoint.py/InductorEndpoint._startRelay