MCPcopy Index your code
hub / github.com/HelloZeroNet/ZeroNet / response

Method response

src/File/FileRequest.py:48–58  ·  view source on GitHub ↗
(self, msg, streaming=False)

Source from the content-addressed store, hash-verified

46 self.connection.sendRawfile(file, read_bytes)
47
48 def response(self, msg, streaming=False):
49 if self.responded:
50 if config.verbose:
51 self.log.debug("Req id %s already responded" % self.req_id)
52 return
53 if not isinstance(msg, dict): # If msg not a dict create a {"body": msg}
54 msg = {"body": msg}
55 msg["cmd"] = "response"
56 msg["to"] = self.req_id
57 self.responded = True
58 self.send(msg, streaming=streaming)
59
60 # Route file requests
61 def route(self, cmd, req_id, params):

Callers 11

routeMethod · 0.95
actionUpdateMethod · 0.95
handleGetFileMethod · 0.95
actionPexMethod · 0.95
actionListModifiedMethod · 0.95
actionGetHashfieldMethod · 0.95
actionFindHashIdsMethod · 0.95
actionSetHashfieldMethod · 0.95
actionPingMethod · 0.95
actionCheckportMethod · 0.95
actionUnknownMethod · 0.95

Calls 1

sendMethod · 0.95

Tested by

no test coverage detected