/** * Subclasses must implement this method to perform the actual IO of writing data to the connection. * * @param data * The data to write, as a {@link Buffer}. * @param onComplete * The callback to invoke when the write is complete. */ protected void write(Buffer data, Deferred<Void, Promise<Void>> onComplete, boolean flush) { write(data.byteBuffer(), onComplete, flush); }