SubscribableStream class
원시 바이트를 소모성 형식으로 변환하는 PayloadAssembler 함께 작동하는 Duplex 확장입니다.
- Extends
-
Duplex
생성자
| Subscribable |
SubscribableStream 클래스의 새 인스턴스를 초기화합니다. |
속성
| length |
상속된 속성
| default |
|
| readable | |
| readable |
|
| readable |
|
| readable |
|
| writable | |
| writable |
|
| writable |
메서드
| subscribe((chunk: any) => void) | 데이터를 받을 때 스트림을 구독합니다. |
상속된 메서드
생성자 세부 정보
SubscribableStream(DuplexOptions)
SubscribableStream 클래스의 새 인스턴스를 초기화합니다.
new SubscribableStream(options?: DuplexOptions)
매개 변수
- options
-
DuplexOptions
이 스트림을 생성할 때 사용할 DuplexOptions.
속성 세부 정보
length
length: number
속성 값
number
상속된 속성 세부 정보
defaultMaxListeners
static defaultMaxListeners: number
속성 값
number
EventEmitter.defaultMaxListeners에서 상속된
readable
readable: boolean
속성 값
boolean
Readable.readable에서 상속된
readableFlowing
readableFlowing: boolean | null
속성 값
boolean | null
Readable.readableFlowing에서 상속된
readableHighWaterMark
readableHighWaterMark: number
속성 값
number
Readable.readableHighWaterMark에서 상속된
readableLength
readableLength: number
속성 값
number
Readable.readableLength에서 상속된
writable
writable: boolean
속성 값
boolean
Duplex.writable에서 상속된
writableHighWaterMark
writableHighWaterMark: number
속성 값
number
Duplex.writableHighWaterMark에서 상속된
writableLength
writableLength: number
속성 값
number
Duplex.writableLength에서 상속된
메서드 세부 정보
subscribe((chunk: any) => void)
데이터를 받을 때 스트림을 구독합니다.
function subscribe(onData: (chunk: any) => void)
매개 변수
- onData
-
(chunk: any) => void
onData가 실행될 때 호출할 콜백입니다.
상속된 메서드 세부 정보
addListener("close", () => void)
이벤트 내보내기 다음을 비롯한 문서에 대해 정의된 이벤트입니다.
- 닫다
- 데이터
- 끝
- 읽을
- 오류
function addListener(event: "close", listener: () => void): this
매개 변수
- event
-
"close"
- listener
-
() => void
반환
this
Readable.addListener에서 상속된
addListener("data", (chunk: any) => void)
function addListener(event: "data", listener: (chunk: any) => void): this
매개 변수
- event
-
"data"
- listener
-
(chunk: any) => void
반환
this
Readable.addListener에서 상속된
addListener("end", () => void)
function addListener(event: "end", listener: () => void): this
매개 변수
- event
-
"end"
- listener
-
() => void
반환
this
Readable.addListener에서 상속된
addListener("error", (err: Error) => void)
function addListener(event: "error", listener: (err: Error) => void): this
매개 변수
- event
-
"error"
- listener
-
(err: Error) => void
반환
this
Readable.addListener에서 상속된
addListener("readable", () => void)
function addListener(event: "readable", listener: () => void): this
매개 변수
- event
-
"readable"
- listener
-
() => void
반환
this
Readable.addListener에서 상속된
addListener(string | symbol, (args: any[]) => void)
function addListener(event: string | symbol, listener: (args: any[]) => void): this
매개 변수
- event
-
string | symbol
- listener
-
(args: any[]) => void
반환
this
Readable.addListener에서 상속된
cork()
function cork()
Duplex.코르크에서 상속된
destroy(Error)
function destroy(error?: Error)
매개 변수
- error
-
Error
Readable.destroy에서 상속된
emit("close")
function emit(event: "close"): boolean
매개 변수
- event
-
"close"
반환
boolean
Readable.emit에서 상속된
emit("data", any)
function emit(event: "data", chunk: any): boolean
매개 변수
- event
-
"data"
- chunk
-
any
반환
boolean
Readable.emit에서 상속된
emit("end")
function emit(event: "end"): boolean
매개 변수
- event
-
"end"
반환
boolean
Readable.emit에서 상속된
emit("error", Error)
function emit(event: "error", err: Error): boolean
매개 변수
- event
-
"error"
- err
-
Error
반환
boolean
Readable.emit에서 상속된
emit("readable")
function emit(event: "readable"): boolean
매개 변수
- event
-
"readable"
반환
boolean
Readable.emit에서 상속된
emit(string | symbol, any[])
function emit(event: string | symbol, args: any[]): boolean
매개 변수
- event
-
string | symbol
- args
-
any[]
반환
boolean
Readable.emit에서 상속된
end(() => void)
function end(cb?: () => void)
매개 변수
- cb
-
() => void
Duplex.end에서 상속된
end(any, () => void)
function end(chunk: any, cb?: () => void)
매개 변수
- chunk
-
any
- cb
-
() => void
Duplex.end에서 상속된
end(any, string, () => void)
function end(chunk: any, encoding?: string, cb?: () => void)
매개 변수
- chunk
-
any
- encoding
-
string
- cb
-
() => void
Duplex.end에서 상속된
eventNames()
function eventNames(): Array<string | symbol>
반환
Array<string | symbol>
EventEmitter.eventNames에서 상속된
getMaxListeners()
function getMaxListeners(): number
반환
number
EventEmitter.getMaxListeners에서 상속된
isPaused()
function isPaused(): boolean
반환
boolean
Readable.isPaused에서 상속된
listenerCount(EventEmitter, string | symbol)
경고
이 API는 이제 사용되지 않습니다.
since v4.0.0
static function listenerCount(emitter: EventEmitter, event: string | symbol): number
매개 변수
- emitter
-
EventEmitter
- event
-
string | symbol
반환
number
EventEmitter.listenerCount에서 상속된
listenerCount(string | symbol)
function listenerCount(type: string | symbol): number
매개 변수
- type
-
string | symbol
반환
number
EventEmitter.listenerCount에서 상속된
listeners(string | symbol)
function listeners(event: string | symbol): Function[]
매개 변수
- event
-
string | symbol
반환
Function[]
EventEmitter.listeners에서 상속된
off(string | symbol, (args: any[]) => void)
function off(event: string | symbol, listener: (args: any[]) => void): this
매개 변수
- event
-
string | symbol
- listener
-
(args: any[]) => void
반환
this
EventEmitter.off에서 상속된
on("close", () => void)
function on(event: "close", listener: () => void): this
매개 변수
- event
-
"close"
- listener
-
() => void
반환
this
Readable.on에서 상속된
on("data", (chunk: any) => void)
function on(event: "data", listener: (chunk: any) => void): this
매개 변수
- event
-
"data"
- listener
-
(chunk: any) => void
반환
this
Readable.on에서 상속된
on("end", () => void)
function on(event: "end", listener: () => void): this
매개 변수
- event
-
"end"
- listener
-
() => void
반환
this
Readable.on에서 상속된
on("error", (err: Error) => void)
function on(event: "error", listener: (err: Error) => void): this
매개 변수
- event
-
"error"
- listener
-
(err: Error) => void
반환
this
Readable.on에서 상속된
on("readable", () => void)
function on(event: "readable", listener: () => void): this
매개 변수
- event
-
"readable"
- listener
-
() => void
반환
this
Readable.on에서 상속된
on(string | symbol, (args: any[]) => void)
function on(event: string | symbol, listener: (args: any[]) => void): this
매개 변수
- event
-
string | symbol
- listener
-
(args: any[]) => void
반환
this
Readable.on에서 상속된
once("close", () => void)
function once(event: "close", listener: () => void): this
매개 변수
- event
-
"close"
- listener
-
() => void
반환
this
Readable.once에서 상속된
once("data", (chunk: any) => void)
function once(event: "data", listener: (chunk: any) => void): this
매개 변수
- event
-
"data"
- listener
-
(chunk: any) => void
반환
this
Readable.once에서 상속된
once("end", () => void)
function once(event: "end", listener: () => void): this
매개 변수
- event
-
"end"
- listener
-
() => void
반환
this
Readable.once에서 상속된
once("error", (err: Error) => void)
function once(event: "error", listener: (err: Error) => void): this
매개 변수
- event
-
"error"
- listener
-
(err: Error) => void
반환
this
Readable.once에서 상속된
once("readable", () => void)
function once(event: "readable", listener: () => void): this
매개 변수
- event
-
"readable"
- listener
-
() => void
반환
this
Readable.once에서 상속된
once(NodeEventTarget, string | symbol)
static function once(emitter: NodeEventTarget, event: string | symbol): Promise<any[]>
매개 변수
- emitter
-
NodeEventTarget
- event
-
string | symbol
반환
Promise<any[]>
EventEmitter.once에서 상속된
once(string | symbol, (args: any[]) => void)
function once(event: string | symbol, listener: (args: any[]) => void): this
매개 변수
- event
-
string | symbol
- listener
-
(args: any[]) => void
반환
this
Readable.once에서 상속된
pause()
function pause(): this
반환
this
Readable.pause에서 상속된
pipe<T>(T, { end?: boolean })
function pipe<T>(destination: T, options?: { end?: boolean }): T
매개 변수
- destination
-
T
- options
-
{ end?: boolean }
반환
T
internal.pipe에서 상속된
prependListener("close", () => void)
function prependListener(event: "close", listener: () => void): this
매개 변수
- event
-
"close"
- listener
-
() => void
반환
this
Readable.prependListener에서 상속된
prependListener("data", (chunk: any) => void)
function prependListener(event: "data", listener: (chunk: any) => void): this
매개 변수
- event
-
"data"
- listener
-
(chunk: any) => void
반환
this
Readable.prependListener에서 상속된
prependListener("end", () => void)
function prependListener(event: "end", listener: () => void): this
매개 변수
- event
-
"end"
- listener
-
() => void
반환
this
Readable.prependListener에서 상속된
prependListener("error", (err: Error) => void)
function prependListener(event: "error", listener: (err: Error) => void): this
매개 변수
- event
-
"error"
- listener
-
(err: Error) => void
반환
this
Readable.prependListener에서 상속된
prependListener("readable", () => void)
function prependListener(event: "readable", listener: () => void): this
매개 변수
- event
-
"readable"
- listener
-
() => void
반환
this
Readable.prependListener에서 상속된
prependListener(string | symbol, (args: any[]) => void)
function prependListener(event: string | symbol, listener: (args: any[]) => void): this
매개 변수
- event
-
string | symbol
- listener
-
(args: any[]) => void
반환
this
Readable.prependListener에서 상속된
prependOnceListener("close", () => void)
function prependOnceListener(event: "close", listener: () => void): this
매개 변수
- event
-
"close"
- listener
-
() => void
반환
this
Readable.prependOnceListener에서 상속된
prependOnceListener("data", (chunk: any) => void)
function prependOnceListener(event: "data", listener: (chunk: any) => void): this
매개 변수
- event
-
"data"
- listener
-
(chunk: any) => void
반환
this
Readable.prependOnceListener에서 상속된
prependOnceListener("end", () => void)
function prependOnceListener(event: "end", listener: () => void): this
매개 변수
- event
-
"end"
- listener
-
() => void
반환
this
Readable.prependOnceListener에서 상속된
prependOnceListener("error", (err: Error) => void)
function prependOnceListener(event: "error", listener: (err: Error) => void): this
매개 변수
- event
-
"error"
- listener
-
(err: Error) => void
반환
this
Readable.prependOnceListener에서 상속된
prependOnceListener("readable", () => void)
function prependOnceListener(event: "readable", listener: () => void): this
매개 변수
- event
-
"readable"
- listener
-
() => void
반환
this
Readable.prependOnceListener에서 상속된
prependOnceListener(string | symbol, (args: any[]) => void)
function prependOnceListener(event: string | symbol, listener: (args: any[]) => void): this
매개 변수
- event
-
string | symbol
- listener
-
(args: any[]) => void
반환
this
Readable.prependOnceListener에서 상속된
push(any, string)
function push(chunk: any, encoding?: string): boolean
매개 변수
- chunk
-
any
- encoding
-
string
반환
boolean
Readable.push에서 상속된
rawListeners(string | symbol)
function rawListeners(event: string | symbol): Function[]
매개 변수
- event
-
string | symbol
반환
Function[]
EventEmitter.rawListeners에서 상속된
read(number)
function read(size?: number): any
매개 변수
- size
-
number
반환
any
Readable.read에서 상속된
removeAllListeners(string | symbol)
function removeAllListeners(event?: string | symbol): this
매개 변수
- event
-
string | symbol
반환
this
EventEmitter.removeAllListeners에서 상속된
removeListener("close", () => void)
function removeListener(event: "close", listener: () => void): this
매개 변수
- event
-
"close"
- listener
-
() => void
반환
this
Readable.removeListener에서 상속된
removeListener("data", (chunk: any) => void)
function removeListener(event: "data", listener: (chunk: any) => void): this
매개 변수
- event
-
"data"
- listener
-
(chunk: any) => void
반환
this
Readable.removeListener에서 상속된
removeListener("end", () => void)
function removeListener(event: "end", listener: () => void): this
매개 변수
- event
-
"end"
- listener
-
() => void
반환
this
Readable.removeListener에서 상속된
removeListener("error", (err: Error) => void)
function removeListener(event: "error", listener: (err: Error) => void): this
매개 변수
- event
-
"error"
- listener
-
(err: Error) => void
반환
this
Readable.removeListener에서 상속된
removeListener("readable", () => void)
function removeListener(event: "readable", listener: () => void): this
매개 변수
- event
-
"readable"
- listener
-
() => void
반환
this
Readable.removeListener에서 상속된
removeListener(string | symbol, (args: any[]) => void)
function removeListener(event: string | symbol, listener: (args: any[]) => void): this
매개 변수
- event
-
string | symbol
- listener
-
(args: any[]) => void
반환
this
Readable.removeListener에서 상속된
resume()
function resume(): this
반환
this
Readable.resume에서 상속된
setDefaultEncoding(string)
function setDefaultEncoding(encoding: string): this
매개 변수
- encoding
-
string
반환
this
Duplex.setDefaultEncoding에서 상속됨
setEncoding(string)
function setEncoding(encoding: string): this
매개 변수
- encoding
-
string
반환
this
Readable.setEncoding에서 상속된
setMaxListeners(number)
function setMaxListeners(n: number): this
매개 변수
- n
-
number
반환
this
EventEmitter.setMaxListeners에서 상속된
uncork()
function uncork()
Duplex.uncork에서 상속된
unpipe(WritableStream)
function unpipe(destination?: WritableStream): this
매개 변수
- destination
-
WritableStream
반환
this
Readable.unpipe에서 상속된
unshift(any)
function unshift(chunk: any)
매개 변수
- chunk
-
any
Readable.unshift에서 상속된
wrap(ReadableStream)
function wrap(oldStream: ReadableStream): this
매개 변수
- oldStream
-
ReadableStream
반환
this
Readable.wrap에서 상속된
write(any, (error: Error | null | undefined) => void)
function write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean
매개 변수
- chunk
-
any
- cb
-
(error: Error | null | undefined) => void
반환
boolean
Duplex.write에서 상속된
write(any, string, (error: Error | null | undefined) => void)
function write(chunk: any, encoding?: string, cb?: (error: Error | null | undefined) => void): boolean
매개 변수
- chunk
-
any
- encoding
-
string
- cb
-
(error: Error | null | undefined) => void
반환
boolean
Duplex.write에서 상속된