Takes care of incoming connections.
(self, sock)
| 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.' |