Attempts to flush any queued output data to the server. Returns
FlushOk if successful (or if the send queue is empty),
FlushFailed if it failed for some reason, or
FlushWriting if it was unable to send all the data in the send
queue yet (this case can only occur if the connection is nonblocking).