MCPcopy
hub / github.com/firerpa/lamda / BcastCallMethod

Function BcastCallMethod

tools/discover.py:19–34  ·  view source on GitHub ↗
(method)

Source from the content-addressed store, hash-verified

17
18
19def BcastCallMethod(method):
20 req = BcastRequest(method=method)
21 # ASTBCAST + length (body,4byte) + body + feeedeed
22 hdr = BcastHeader(magic=0x54534143,
23 version=__version__)
24 req.header.CopyFrom(hdr)
25 body = req.SerializeToString()
26 buffer = []
27 r = struct.pack("QH", 0x5453414342545341, len(body))
28 buffer.append(r)
29 r = struct.pack("{}s".format(len(body)), body)
30 buffer.append(r)
31 r = struct.pack("I", 0xeedeeefe)
32 buffer.append(r)
33 r = bytes().join(buffer)
34 return r
35
36
37sock = socket(AF_INET, SOCK_DGRAM)

Callers 1

discover.pyFile · 0.85

Calls 1

formatMethod · 0.80

Tested by

no test coverage detected