writeBufferPart method
Implementation
Future<Buffer> writeBufferPart(Buffer buffer, int start, int length) {
log.fine('writeBuffer length=${buffer.length}');
if (_closed) {
throw StateError('Cannot write to socket, it is closed');
}
if (_writingBuffer != null) {
throw StateError('Cannot write to socket, already writing');
}
_writingBuffer = buffer;
_writeCompleter = Completer<Buffer>();
_writeOffset = start;
_writeLength = length + start;
_writeBuffer();
return _writeCompleter.future;
}