All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.scalajs.nodejs.stream.Duplex.scala Maven / Gradle / Ivy

There is a newer version: 0.4.2
Show newest version
package io.scalajs.nodejs.stream

import scala.scalajs.js
import scala.scalajs.js.annotation.JSName

/**
  * A "duplex" stream is one that is both Readable and Writable, such as a TCP socket connection.
  * 

Note that stream.Duplex is an abstract class designed to be extended with an underlying * implementation of the stream._read(size) and stream._write(chunk, encoding, callback) methods as you * would with a Readable or Writable stream class. * * Since JavaScript doesn't have multiple prototypal inheritance, this class prototypally inherits * from Readable, and then parasitically from Writable. It is thus up to the user to implement both * the low-level stream._read(n) method as well as the low-level stream._write(chunk, encoding, callback) * method on extension duplex classes. * @author [email protected] */ @js.native trait Duplex extends Readable with Writable @js.native @JSName("Duplex") object Duplex extends DuplexClass





© 2015 - 2024 Weber Informatics LLC | Privacy Policy