def __init__(self, addr, connect=True):
self.log = logging.getLogger('<STR_LIT>' % (<EOL>self.__module__, self.__class__.__name__))<EOL>self.sock = None<EOL>self.addr = addr<EOL>self.received_frames = Queue()<EOL>self.read_stopped = threading.Event()<EOL>self.buffer = FrameBuffer()<EOL>if connect:<EOL><INDENT>self._connect()<EOL><DEDENT>
@param addr: The (host,port) tuple for connection.
@type addr: C{tuple}

@param connect: Whether to connect socket to specified addr.
@type connect: C{bool}