HTTP requests by agents

@ctmorrison Yes, the connection to the server could be lost; server.isconnected() just reflects the assumed state of the connection; as a TCP connection is silent when connected, all that means is that the device has heard from the server in the last 90 seconds (default timeouts). The connection could have gone down 89 seconds ago and isconnected() will return true.

The only way for isconnected() to reflect the state right at that second would be if it sent a packet to the server and waited for it to be acked before returning true - and even then, the connection could go down immediately after that.

Past performance is not an indication of future performance, essentially, because stuff happens.

The delayed messages are due to the connection going away and the imp still trying to get the message through, then finally managing it.

@coverdriven the problem here is satisfying everyone; right now the behavior you want can be done with a positive ACK from the agent. A non-blocking WAIT_FOR_ACK is in theory possible, I’ll file a request.