MCPcopy Index your code
hub / github.com/Syncplay/syncplay / handleMessages

Method handleMessages

syncplay/protocols.py:20–38  ·  view source on GitHub ↗
(self, messages)

Source from the content-addressed store, hash-verified

18
19class JSONCommandProtocol(LineReceiver):
20 def handleMessages(self, messages):
21 for message in messages.items():
22 command = message[0]
23 if command == "Hello":
24 self.handleHello(message[1])
25 elif command == "Set":
26 self.handleSet(message[1])
27 elif command == "List":
28 self.handleList(message[1])
29 elif command == "State":
30 self.handleState(message[1])
31 elif command == "Error":
32 self.handleError(message[1])
33 elif command == "Chat":
34 self.handleChat(message[1])
35 elif command == "TLS":
36 self.handleTLS(message[1])
37 else:
38 self.dropWithError(getMessage("unknown-command-server-error").format(message[1])) # TODO: log, not drop
39
40 def lineReceived(self, line):
41 try:

Callers 1

lineReceivedMethod · 0.95

Calls 9

dropWithErrorMethod · 0.95
getMessageFunction · 0.90
handleHelloMethod · 0.45
handleSetMethod · 0.45
handleListMethod · 0.45
handleStateMethod · 0.45
handleErrorMethod · 0.45
handleChatMethod · 0.45
handleTLSMethod · 0.45

Tested by

no test coverage detected