send a heartbeat and record time The "last heartbeat" time is recorded in a global variable such that the service thread can decide whether a new heartbeat is due.
| 717 | // heartbeat is due. |
| 718 | // |
| 719 | static void heartbeat() |
| 720 | { |
| 721 | unsigned char seq[2]; |
| 722 | |
| 723 | seq[0] = 0x7e; |
| 724 | seq[1] = 0xfe; |
| 725 | writeControl(seq, 2); |
| 726 | lastbeat = time(NULL); |
| 727 | } |
| 728 | #endif /* defined(HAVE_SOCKETPAIR) && defined(HAVE_SELECT) */ |
| 729 | |
| 730 |
no test coverage detected