MCPcopy Create free account
hub / github.com/ARM-software/AVH / connectToServer

Method connectToServer

interface/vstream/python/vsi_video.py:65–84  ·  view source on GitHub ↗

Attempt to connect to the VSI video server at the given address with the provided authkey. Args: address: The (IP, port) tuple for the server to connect to. authkey: The authorization key for server connection. Returns: None

(self, address, authkey)

Source from the content-addressed store, hash-verified

63 self.conn = None
64
65 def connectToServer(self, address, authkey):
66 """
67 Attempt to connect to the VSI video server at the given address with the provided authkey.
68
69 Args:
70 address: The (IP, port) tuple for the server to connect to.
71 authkey: The authorization key for server connection.
72 Returns:
73 None
74 """
75 for _ in range(40):
76 try:
77 self.conn = Client(address, authkey=authkey.encode('utf-8'))
78 if isinstance(self.conn, Connection):
79 break
80 else:
81 self.conn = None
82 except Exception:
83 self.conn = None
84 time.sleep(0.05)
85
86 def setMode(self, mode):
87 """

Callers 1

initFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected