MCPcopy Create free account
hub / github.com/a943512/PyAibote / _Send

Method _Send

PyAibote/WebBotModel/WebLoadWait.py:18–38  ·  view source on GitHub ↗
(self,data)

Source from the content-addressed store, hash-verified

16 Show_Waiting_Throwing = False
17
18 def _Send(self,data):
19 self.debug(rf"->>> {data}")
20
21 self.request.sendall(data)
22 response = self.request.recv(87654)
23 if response == b"":
24 self.request.close()
25 raise ConnectionAbortedError(f"{self.client_address[0]}:{self.client_address[1]} Client disconnects")
26 data_length, data = response.split(b"/", 1)
27 while int(data_length) > len(data):
28 data += self.request.recv(87654)
29
30 response = data.decode('UTF-8')
31 if len(response) > 10000:
32 self.debug(rf"<-<- {response[:100]}......")
33 else:
34 self.debug(rf"<-<- {response}")
35 if response == b"":
36 self.request.close()
37 raise ConnectionAbortedError(f"{self.client_address[0]}:{self.client_address[1]} Client disconnects")
38 return response
39
40 def StarLoadWait(self, data):
41 response = self._Send(data)

Callers 1

StarLoadWaitMethod · 0.95

Calls 1

debugMethod · 0.45

Tested by

no test coverage detected