writable._writev(chunks, callback)


  • chunks <Object[]>

  • callback <Function> 当对提供的块的处理完成时要调用的回调函数(可选地带有错误参数)。

此函数不得由应用程序代码直接调用。 它应该由子类实现,并且只能由内部 Writable 类方法调用。

writable._writev() 方法可以在能够同时处理多个数据块的流实现中作为 writable._write() 的补充或替代来实现。 如果实现并且有来自先前写入的缓冲数据,则将调用 _writev() 而不是 _write()

writable._writev() 方法以下划线为前缀,因为它是定义它的类的内部方法,不应由用户程序直接调用。

  • chunks <Object[]> The chunks to be written. Each chunk has following format: { chunk: ..., encoding: ... }.
  • callback <Function> A callback function (optionally with an error argument) to be invoked when processing is complete for the supplied chunks.

This function MUST NOT be called by application code directly. It should be implemented by child classes, and called by the internal Writable class methods only.

The writable._writev() method may be implemented in addition or alternatively to writable._write() in stream implementations that are capable of processing multiple chunks of data at once. If implemented and if there is buffered data from previous writes, _writev() will be called instead of _write().

The writable._writev() method is prefixed with an underscore because it is internal to the class that defines it, and should never be called directly by user programs.