The maximum time in seconds to wait for pending data to be sent
This method waits for any pending data to be sent to the server. If all the data is sent and acknowledged within the timeout period, server.flush() returns
true. Otherwise — if any data is still pending after the timeout period has expired, or if an error occurs while sending — it returns
Should server.flush() return
false, you should not take that as a sign that the data has not been or will not be delivered. The method can return
false if, for example, the timeout period is very small. In this case, the flush operation will time out, server.flush() will return
false, yet the data could be ACK’d immediately afterwards.
However, the method has no side effects: should it return
false, it will not close the connection, for example.
This example performs a server.log() shortly before we disconnect from the server. In order to ensure all of the information was sent (and received), we do a server.flush() before disconnecting.