(proc, obj, debug)
| 352 | sys.exit(1) |
| 353 | |
| 354 | def handleBasicMessage(proc, obj, debug): |
| 355 | if 'sendRaw' in obj: |
| 356 | data = obj['sendRaw'] |
| 357 | if debug: print("Sending raw:", data) |
| 358 | writeRawData(proc, data) |
| 359 | return True |
| 360 | elif 'send' in obj: |
| 361 | data = obj['send'] |
| 362 | if debug: print("Sending:", json.dumps(data)) |
| 363 | writePayload(proc, data) |
| 364 | return True |
| 365 | elif 'recv' in obj: |
| 366 | data = obj['recv'] |
| 367 | if debug: print("Waiting for:", json.dumps(data)) |
| 368 | waitForMessage(proc, data) |
| 369 | return True |
| 370 | elif 'message' in obj: |
| 371 | print("MESSAGE:", obj["message"]) |
| 372 | sys.stdout.flush() |
| 373 | return True |
| 374 | return False |
| 375 | |
| 376 | def shutdownProc(proc): |
| 377 | # Tell the server to exit. |
nothing calls this directly
no test coverage detected