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