-- TODO: Add timeout
tlsWaitFor :: Context -> T.Text -> IO ()
tlsWaitFor ctx str = do
        lns <- T.lines . TE.decodeUtf8 <$> recvData ctx
        -- forM_ lns $ printf . T.unpack . ("<<< " <>) . (<> "\n")
        -- hFlush stdout
        case filter (T.isPrefixOf str) lns of
            [] -> tlsWaitFor ctx str
            _  -> return ()
tlsWaitFor :: Context -> T.Text -> IO ()
tlsWaitFor ctx str = do
        lns <- T.lines . TE.decodeUtf8 <$> recvData ctx
        -- forM_ lns $ printf . T.unpack . ("<<< " <>) . (<> "\n")
        -- hFlush stdout
        case filter (T.isPrefixOf str) lns of
            [] -> tlsWaitFor ctx str
            _  -> return ()
tlsWaitFor ctx str = do
        lns <- T.lines . TE.decodeUtf8 <$> recvData ctx
        -- forM_ lns $ printf . T.unpack . ("<<< " <>) . (<> "\n")
        -- hFlush stdout
        case filter (T.isPrefixOf str) lns of
            [] -> tlsWaitFor ctx str
            _  -> return ()