Writes buffer to the socket, and returns the same buffer in a Future which completes when it has all been written.
buffer
Future<Buffer> writeBuffer(Buffer buffer) { return writeBufferPart(buffer, 0, buffer.length); }