MCPcopy Create free account
hub / github.com/ActiveState/code / client

Method client

recipes/Python/496872_zservicepy/recipe-496872.py:82–88  ·  view source on GitHub ↗

Takes care of incoming connections.

(self, sock)

Source from the content-addressed store, hash-verified

80 thread.start_new_thread(self.client, (sock.accept()[0],))
81
82 def client(self, sock):
83 'Takes care of incoming connections.'
84 name, args, kwargs = self.recv(sock)
85 try:
86 self.send(sock, self.services[name](*args, **kwargs))
87 except:
88 self.send(sock, None)
89
90 def add_service(self, name, service):
91 'Adds a new function that the server can execute.'

Callers

nothing calls this directly

Calls 2

recvMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected