Can't call any RPC function with streamlit webrtc

I have a client side of object detection,which code like this:

import numpy as np
import zerorpc
from datetime import datetime
import cv2
import av
class VideoProcessor:
    def __init__(self) -> None: 
        self.rpcClient = zerorpc.Client()
        self.rpcClient.connect("tcp://127.0.0.1:4242")
        self.fps = 0
        self.fpsCounter = 0
        self.fpsTimer = datetime.now()
    def recv(self,frame):
        frame = frame.to_ndarray(format="bgr24")
        image_data = self.rpcClient.preprocess(frame)
        print(image_data.shape)
        inferResult = self.rpcClient.infer(image_data)
        print(inferResult.shape)
        outputFrame = self.rpcClient.postprocess(frame,inferResult)
        print(outputFrame.shape)
        self.fpsCounter += 1
        elapsed = (datetime.now() - self.fpsTimer).total_seconds()
        if elapsed > 1:
            self.fps = self.fpsCounter / elapsed
            self.fpsCounter = 0
            self.fpsTimer = datetime.now()
        frame = cv2.putText(outputFrame, f"FPS: {self.fps:.2f}", (0, 30), cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 0, 255), 2)
        cv2.putText(outputFrame, datetime.now().strftime("%Y %I:%M:%S%p"), (self.imageWidth - 150, 30), cv2.FONT_HERSHEY_SIMPLEX, 0.5, (0,0,255),1, cv2.LINE_AA)
        return av.VideoFrame.from_ndarray(outputFrame, format="bgr24")

Yet,the camera launch sucessfully,but the rpc function not called on my server,the shell output of rpc server is like below:

Starting the server...
Server bound to port 4242
Waiting for requests...
Press CTRL+C to exit

How should i do?