node's input and output streams

 In nodejs, you can use flowing mode and non-flowing mode to read data. When using flowing mode, the operating system's i/o mechanism will be used to read data, which will allow you to read data at the fastest speed. When you use non-flowing mode, you must explicitly call the object's read method to read the data

  enter:

    An object that implements the readabled interface

      fs.readStream、http.incomingMessage、net.Socket、child.stdout、child.stderr、process.stdin、Gzip、Deflate、DeflateRaw

    event that will trigger

      readable、data、end、close、error

    Owned methods and properties

      pipe、unpipe、unshift、read、pause、resume、setEncoding

  output:

    An object that implements the writeabled interface

      fs.writestream、process.stdout、process.stdout、child.stdin、net.Socket、http.ClientRequest、http.ServerResesponse、Gunzip、Infalte、InflateRaw

    event that will trigger

      drain、pipe、unpipe、finish、error

    Owned methods and properties

      end、write

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324996560&siteId=291194637