#ifndef __PING_H_ #define __PING_H_ // When the client expects to hear from the server, and hasn't heard anything // in a while, it will send a "ping" command. The primary purpose of this // command is to test the network. No response is expected. This module // logs all such requests. // // The client will send a ping after about 5 seconds without getting a GetA // response. The thought is that the server might have broken the connection, // but the client doesn't realize it. By attempting to send a message, the // underlying TCP/IP logic will either deliver the message or report an error. // If there is a problem, we should know quickly. On the other hand, if we // don't send anything at the application level, the O/S might only send a ping // about once every 24 hours! (This is configurable, I don't know what we're // really getting.) // // I don't know if this actually solves any problems, or not. I know that this // type of problem can exist. But it usually happens on long time frames. If // I leave an SSH session open all night, and I don't tell it to send a // keep-alive message, and I'm behind a standard home firewall appliance, the // firewall will forget about the connection. This is well documented. There // will be no error message until I try to type something. I don't know if // this happens on smaller timeframes. The client already has a timeout and // will disconnect after about a minute of waiting. And the server will // disconnect after about 5 minutes of idle time. // // This logging feature could also point out other problems. If we see a lot // of these it would mean that something was a lot slower than it should have // been. Of course, we should never see this. We have other logic to try // to send the GetA messages quickly, even if the database is slow and we // can't provide real data. // // In summary, by logging the ping requests we are looking for unexpected, // problems, which might otherwise be hard to debug. void initPing(); #endif