def __init__(self, mode, delimiter="\r\n", callbacks=None):
        super(TCPClientProtocolFactory, self).__init__(callbacks)
        self._protocol_factory = None
        self._protocol_type = mode
        self.protocol = None
        self._connector = None
        self._delimiter = delimiter
        self._addr = ""
        self._port = 0

        if mode == "raw":
            self._protocol_factory = RawProtocol
        elif mode == "string":
            self._protocol_factory = StringRecieverProtocol
        elif mode == "delimiter":
            self._protocol_factory = DelimiterProtocol
        else:
            _log.error("Trying use non existing protocol %s !" % (mode, ))
            raise Exception("Trying use non existing protocol %s !" % (mode, ))
dataset/ETHPy150Open EricssonResearch/calvin-base/calvin/runtime/south/plugins/async/twistedimpl/client_connection.py/TCPClientProtocolFactory.__init__/original