I am making a program that sends "heartbeats" to the server to track nodes. These are packages with the following payloads:
The first two are easy. A thread / loop can set a message for the first and subsequent starts. How to make the loop "catch" shutdown so that it can send the last packet?
I am using the minGW compiler for the C platform in WinXP.
Edit: I added relevant details that I missed (thanks walkTarget and Ferruccio)
- This is an unfinished application that contains messy things in the implementation :-)
- It uses libCURL, the HTTP client library to send packets
- This is a console application that I (much later) intend as a service
- It should save the file and send the package at shutdown
- He needs to fix the system shutdown
source
share