def METHOD_NAME(self, sock: socket.socket) -> Iterator[ChatMessageItem]:
    while True:
        try:
            data = sock.recv(self.buffer_size)
            if not data:
                continue
            resp = data.decode(ENCODING)
            now = dt.datetime.now()
        except socket.timeout as e:
            raise TimeoutError(f"Twitch did not respond in {self.timeout:,d} seconds") from e
        except UnicodeDecodeError:
            continue
        if self._is_ping(resp):
            self._send(sock, IrcMessage.PONG, ":tmi.twitch.tv")
        yield from self._extract_chat_messages(resp, now)