class Duplex extends Object with StObject
Duplex streams are streams that implement both the Readable
and Writable
interfaces.
Examples of Duplex
streams include:
* TCP sockets
* zlib streams
* crypto streams
- Annotations
- @JSType() @JSImport("stream", "Duplex") @native()
- Since
v0.9.4
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- Duplex
- StObject
- Object
- Any
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Instance Constructors
- new Duplex(opts: DuplexOptions)
- new Duplex()
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def _destroy(error: Null, callback: Function1[|[Error, Null], Unit]): Unit
- def _destroy(error: Error, callback: Function1[|[Error, Null], Unit]): Unit
- def _final(callback: Function1[UndefOr[|[Error, Null]], Unit]): Unit
- def _write(chunk: Any, encoding: BufferEncoding, callback: Function1[UndefOr[|[Error, Null]], Unit]): Unit
- var _writev: UndefOr[Function2[Array[Chunk], Function1[UndefOr[|[Error, Null]], Unit], Unit]]
- var allowHalfOpen: Boolean
If
false
then the stream will automatically end the writable side when the readable side ends.If
false
then the stream will automatically end the writable side when the readable side ends. Set initially by theallowHalfOpen
constructor option, which defaults tofalse
.This can be changed manually to change the half-open behavior of an existing
Duplex
stream instance, but must be changed before the'end'
event is emitted.- Since
v0.9.4
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def cork(): Unit
- def end(chunk: Any, encoding: Unit, cb: Function0[Unit]): Unit
- def end(chunk: Any, encoding: BufferEncoding, cb: Function0[Unit]): Unit
- def end(chunk: Any, encoding: BufferEncoding): Unit
- def end(chunk: Any, cb: Function0[Unit]): Unit
- def end(chunk: Any): Unit
- def end(cb: Function0[Unit]): Unit
- def end(): Unit
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hasOwnProperty(v: String): Boolean
- Definition Classes
- Object
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isPrototypeOf(v: Object): Boolean
- Definition Classes
- Object
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def propertyIsEnumerable(v: String): Boolean
- Definition Classes
- Object
- def setDefaultEncoding(encoding: BufferEncoding): Duplex.this.type
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toLocaleString(): String
- Definition Classes
- Object
- def toString(): String
- Definition Classes
- AnyRef → Any
- def uncork(): Unit
- def valueOf(): Any
- Definition Classes
- Object
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- val writable: Boolean
- val writableCorked: Double
- val writableEnded: Boolean
- val writableFinished: Boolean
- val writableHighWaterMark: Double
- val writableLength: Double
- val writableObjectMode: Boolean
- def write(chunk: Any, encoding: Unit, cb: Function1[UndefOr[|[Error, Null]], Unit]): Boolean
- def write(chunk: Any, encoding: BufferEncoding, cb: Function1[UndefOr[|[Error, Null]], Unit]): Boolean
- def write(chunk: Any, encoding: BufferEncoding): Boolean
- def write(chunk: Any, cb: Function1[UndefOr[|[Error, Null]], Unit]): Boolean
- def write(chunk: Any): Boolean
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated