| 165 | |
| 166 | def start_client_thread(self, client_port): |
| 167 | class ClientThread(threading.Thread): |
| 168 | def __init__(self, client_port): |
| 169 | threading.Thread.__init__(self) |
| 170 | self.client_port = client_port |
| 171 | |
| 172 | def run(self): |
| 173 | class HandleRequestInput: |
| 174 | def RequestInput(self): |
| 175 | client_thread.requested_input = True |
| 176 | return "input_request" |
| 177 | |
| 178 | def NotifyFinished(self, *args, **kwargs): |
| 179 | client_thread.notified_finished += 1 |
| 180 | return 1 |
| 181 | |
| 182 | handle_request_input = HandleRequestInput() |
| 183 | |
| 184 | from _pydev_bundle import pydev_localhost |
| 185 | |
| 186 | client_server = SimpleXMLRPCServer((pydev_localhost.get_localhost(), self.client_port), logRequests=False) |
| 187 | client_server.register_function(handle_request_input.RequestInput) |
| 188 | client_server.register_function(handle_request_input.NotifyFinished) |
| 189 | client_server.serve_forever() |
| 190 | |
| 191 | client_thread = ClientThread(client_port) |
| 192 | client_thread.requested_input = False |
no outgoing calls