MCPcopy Create free account
hub / github.com/JoshuaPostel/texaform / send

Method send

python/agent.py:19–32  ·  view source on GitHub ↗
(self, msg: str)

Source from the content-addressed store, hash-verified

17 self.location: Point = location
18
19 def send(self, msg: str) -> str:
20 self.socket.sendall(str.encode(msg + ";"))
21 # TODO move to logging setup
22 #print(f"sent: {msg}")
23 buffer = b""
24 while b";" not in buffer:
25 data = self.socket.recv(32)
26 buffer += data
27 response = buffer.decode("utf-8")
28 # strip the trailing ;
29 response = response[:-1]
30 # TODO move to logging setup
31 #print(f"recv: {response}")
32 return response
33
34 def kind(self) -> str:
35 response = self.send("KIND")

Callers 1

kindMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected