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

Method _Send

PyAibote/AndroidBotModel/AndroidLoadWait.py:17–37  ·  view source on GitHub ↗
(self,data)

Source from the content-addressed store, hash-verified

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

Callers 1

StarLoadWaitMethod · 0.95

Calls 1

debugMethod · 0.45

Tested by

no test coverage detected