| 539 | |
| 540 | #if mxLinux |
| 541 | gboolean PiuDebugMachineCallback(GSocket *socket, GIOCondition condition, gpointer user_data) |
| 542 | { |
| 543 | PiuDebugMachine self = (PiuDebugMachine)user_data; |
| 544 | gssize length = g_socket_receive(self->socket, self->buffer, XS_BUFFER_COUNT, NULL, NULL); |
| 545 | if (length > 0) { |
| 546 | self->buffer[length] = 0; |
| 547 | //fprintf(stderr, "%s", self->buffer); |
| 548 | xsBeginHost(self->the); |
| 549 | { |
| 550 | xsVars(4); |
| 551 | PiuDebugMachineParse(self, self->buffer, length); |
| 552 | |
| 553 | xsResult = xsGet(xsGlobal, xsID_application); |
| 554 | PiuApplication* application = PIU(Application, xsResult); |
| 555 | PiuApplicationAdjust(application); |
| 556 | } |
| 557 | xsEndHost(); |
| 558 | } |
| 559 | else { |
| 560 | PiuDebugMachineDisconnect(self); |
| 561 | xsBeginHost(self->the); |
| 562 | { |
| 563 | (void)xsCall0(self->thisSlot, xsID_onDisconnected); |
| 564 | } |
| 565 | xsEndHost(); |
| 566 | } |
| 567 | return TRUE; |
| 568 | } |
| 569 | #elif mxMacOSX |
| 570 | void PiuDebugMachineCallback(CFSocketRef socketRef, CFSocketCallBackType cbType, CFDataRef addr, const void* data, void* context) |
| 571 | { |
nothing calls this directly
no test coverage detected