def settimeout ( self , timeout ) : self . sock_opt . timeout = timeout if self . sock : self . sock . settimeout ( timeout )
python websocket stream remove delay
Set the timeout to the websocket .
def settimeout(self, timeout):
        """
        Set the timeout to the websocket.

        timeout: timeout time(second).
        """
        self.sock_opt.timeout = timeout
        if self.sock:
            self.sock.settimeout(timeout)