다음을 통해 공유


INodeSocket interface

Node.jsnet 모듈의 소켓을 나타냅니다. 이 인터페이스는 프레임워크를 지원하며 코드에 대해 직접 호출할 수 없습니다.

속성

bufferSize
bytesRead
bytesWritten
connecting
destroyed
localAddress
localPort
readable
readableFlowing
readableHighWaterMark
readableLength
writable
writableHighWaterMark
writableLength

메서드

addListener("close", () => void)
addListener("data", (chunk: any) => void)
addListener("end", () => void)
addListener("error", (err: Error) => void)
addListener("readable", () => void)
addListener(string | symbol, (args: any[]) => void)
address()
connect(any, () => void)
connect(number, () => void)
connect(number, string, () => void)
connect(string, () => void)
cork()
destroy(Error)
emit("close")
emit("data", any)
emit("end")
emit("error", Error)
emit("readable")
emit(string | symbol, any[])
end(() => void)
end(any, () => void)
end(any, string, () => void)
eventNames()
getMaxListeners()
isPaused()
listenerCount(string | symbol)
listeners(string | symbol)
off(string | symbol, (args: any[]) => void)
on("close", (had_error: boolean) => void)
on("connect", () => void)
on("data", (data: INodeBuffer) => void)
on("end", () => void)
on("error", (err: Error) => void)
on(string, (args: any[]) => void)
once("close", () => void)
once("data", (chunk: any) => void)
once("end", () => void)
once("error", (err: Error) => void)
once("readable", () => void)
once(string | symbol, (args: any[]) => void)
pause()
pipe<T>(T, { end?: boolean })
prependListener("close", () => void)
prependListener("data", (chunk: any) => void)
prependListener("end", () => void)
prependListener("error", (err: Error) => void)
prependListener("readable", () => void)
prependListener(string | symbol, (args: any[]) => void)
prependOnceListener("close", () => void)
prependOnceListener("data", (chunk: any) => void)
prependOnceListener("end", () => void)
prependOnceListener("error", (err: Error) => void)
prependOnceListener("readable", () => void)
prependOnceListener(string | symbol, (args: any[]) => void)
push(any, string)
rawListeners(string | symbol)
read(number)
ref()
removeAllListeners(string | symbol)
removeListener(string | symbol, (args: any[]) => void)
resume()
setDefaultEncoding(string)
setEncoding(string)
setKeepAlive(boolean, number)
setMaxListeners(number)
setNoDelay(boolean)
setTimeout(number, () => void)
uncork()
unpipe(any)
unref()
unshift(any)
wrap(any)
write(any, (error: Error | null | undefined) => void)
write(any, string, (error: Error | null | undefined) => void)
write(any, string, Function)
write(string, Function)
write(string, string, Function)
write(string, string, string)
write(ValidBuffer)
write(ValidBuffer, (err?: Error) => void)

속성 세부 정보

bufferSize

bufferSize: number

속성 값

number

bytesRead

bytesRead: number

속성 값

number

bytesWritten

bytesWritten: number

속성 값

number

connecting

connecting: boolean

속성 값

boolean

destroyed

destroyed: boolean

속성 값

boolean

localAddress

localAddress: string

속성 값

string

localPort

localPort: number

속성 값

number

readable

readable: boolean

속성 값

boolean

readableFlowing

readableFlowing: boolean | null

속성 값

boolean | null

readableHighWaterMark

readableHighWaterMark: number

속성 값

number

readableLength

readableLength: number

속성 값

number

writable

writable: boolean

속성 값

boolean

writableHighWaterMark

writableHighWaterMark: number

속성 값

number

writableLength

writableLength: number

속성 값

number

메서드 세부 정보

addListener("close", () => void)

function addListener(event: "close", listener: () => void): this

매개 변수

event

"close"

listener

() => void

반환

this

addListener("data", (chunk: any) => void)

function addListener(event: "data", listener: (chunk: any) => void): this

매개 변수

event

"data"

listener

(chunk: any) => void

반환

this

addListener("end", () => void)

function addListener(event: "end", listener: () => void): this

매개 변수

event

"end"

listener

() => void

반환

this

addListener("error", (err: Error) => void)

function addListener(event: "error", listener: (err: Error) => void): this

매개 변수

event

"error"

listener

(err: Error) => void

반환

this

addListener("readable", () => void)

function addListener(event: "readable", listener: () => void): this

매개 변수

event

"readable"

listener

() => void

반환

this

addListener(string | symbol, (args: any[]) => void)

function addListener(event: string | symbol, listener: (args: any[]) => void): this

매개 변수

event

string | symbol

listener

(args: any[]) => void

반환

this

address()

function address(): AddressInfo | string

반환

AddressInfo | string

connect(any, () => void)

function connect(options: any, connectionListener?: () => void): any

매개 변수

options

any

connectionListener

() => void

반환

any

connect(number, () => void)

function connect(port: number, connectionListener?: () => void): any

매개 변수

port

number

connectionListener

() => void

반환

any

connect(number, string, () => void)

function connect(port: number, host: string, connectionListener?: () => void): any

매개 변수

port

number

host

string

connectionListener

() => void

반환

any

connect(string, () => void)

function connect(path: string, connectionListener?: () => void): any

매개 변수

path

string

connectionListener

() => void

반환

any

cork()

function cork()

destroy(Error)

function destroy(error?: Error)

매개 변수

error

Error

emit("close")

function emit(event: "close"): boolean

매개 변수

event

"close"

반환

boolean

emit("data", any)

function emit(event: "data", chunk: any): boolean

매개 변수

event

"data"

chunk

any

반환

boolean

emit("end")

function emit(event: "end"): boolean

매개 변수

event

"end"

반환

boolean

emit("error", Error)

function emit(event: "error", err: Error): boolean

매개 변수

event

"error"

err

Error

반환

boolean

emit("readable")

function emit(event: "readable"): boolean

매개 변수

event

"readable"

반환

boolean

emit(string | symbol, any[])

function emit(event: string | symbol, args: any[]): boolean

매개 변수

event

string | symbol

args

any[]

반환

boolean

end(() => void)

function end(cb?: () => void)

매개 변수

cb

() => void

end(any, () => void)

function end(chunk: any, cb?: () => void)

매개 변수

chunk

any

cb

() => void

end(any, string, () => void)

function end(chunk: any, encoding?: string, cb?: () => void)

매개 변수

chunk

any

encoding

string

cb

() => void

eventNames()

function eventNames(): Array<string | symbol>

반환

Array<string | symbol>

getMaxListeners()

function getMaxListeners(): number

반환

number

isPaused()

function isPaused(): boolean

반환

boolean

listenerCount(string | symbol)

function listenerCount(type: string | symbol): number

매개 변수

type

string | symbol

반환

number

listeners(string | symbol)

function listeners(event: string | symbol): Function[]

매개 변수

event

string | symbol

반환

Function[]

off(string | symbol, (args: any[]) => void)

function off(event: string | symbol, listener: (args: any[]) => void): this

매개 변수

event

string | symbol

listener

(args: any[]) => void

반환

this

on("close", (had_error: boolean) => void)

function on(event: "close", listener: (had_error: boolean) => void): this

매개 변수

event

"close"

listener

(had_error: boolean) => void

반환

this

on("connect", () => void)

function on(event: "connect", listener: () => void): this

매개 변수

event

"connect"

listener

() => void

반환

this

on("data", (data: INodeBuffer) => void)

function on(event: "data", listener: (data: INodeBuffer) => void): this

매개 변수

event

"data"

listener

(data: INodeBuffer) => void

반환

this

on("end", () => void)

function on(event: "end", listener: () => void): this

매개 변수

event

"end"

listener

() => void

반환

this

on("error", (err: Error) => void)

function on(event: "error", listener: (err: Error) => void): this

매개 변수

event

"error"

listener

(err: Error) => void

반환

this

on(string, (args: any[]) => void)

function on(event: string, listener: (args: any[]) => void): this

매개 변수

event

string

listener

(args: any[]) => void

반환

this

once("close", () => void)

function once(event: "close", listener: () => void): this

매개 변수

event

"close"

listener

() => void

반환

this

once("data", (chunk: any) => void)

function once(event: "data", listener: (chunk: any) => void): this

매개 변수

event

"data"

listener

(chunk: any) => void

반환

this

once("end", () => void)

function once(event: "end", listener: () => void): this

매개 변수

event

"end"

listener

() => void

반환

this

once("error", (err: Error) => void)

function once(event: "error", listener: (err: Error) => void): this

매개 변수

event

"error"

listener

(err: Error) => void

반환

this

once("readable", () => void)

function once(event: "readable", listener: () => void): this

매개 변수

event

"readable"

listener

() => void

반환

this

once(string | symbol, (args: any[]) => void)

function once(event: string | symbol, listener: (args: any[]) => void): this

매개 변수

event

string | symbol

listener

(args: any[]) => void

반환

this

pause()

function pause(): this

반환

this

pipe<T>(T, { end?: boolean })

function pipe<T>(destination: T, options?: { end?: boolean }): T

매개 변수

destination

T

options

{ end?: boolean }

반환

T

prependListener("close", () => void)

function prependListener(event: "close", listener: () => void): this

매개 변수

event

"close"

listener

() => void

반환

this

prependListener("data", (chunk: any) => void)

function prependListener(event: "data", listener: (chunk: any) => void): this

매개 변수

event

"data"

listener

(chunk: any) => void

반환

this

prependListener("end", () => void)

function prependListener(event: "end", listener: () => void): this

매개 변수

event

"end"

listener

() => void

반환

this

prependListener("error", (err: Error) => void)

function prependListener(event: "error", listener: (err: Error) => void): this

매개 변수

event

"error"

listener

(err: Error) => void

반환

this

prependListener("readable", () => void)

function prependListener(event: "readable", listener: () => void): this

매개 변수

event

"readable"

listener

() => void

반환

this

prependListener(string | symbol, (args: any[]) => void)

function prependListener(event: string | symbol, listener: (args: any[]) => void): this

매개 변수

event

string | symbol

listener

(args: any[]) => void

반환

this

prependOnceListener("close", () => void)

function prependOnceListener(event: "close", listener: () => void): this

매개 변수

event

"close"

listener

() => void

반환

this

prependOnceListener("data", (chunk: any) => void)

function prependOnceListener(event: "data", listener: (chunk: any) => void): this

매개 변수

event

"data"

listener

(chunk: any) => void

반환

this

prependOnceListener("end", () => void)

function prependOnceListener(event: "end", listener: () => void): this

매개 변수

event

"end"

listener

() => void

반환

this

prependOnceListener("error", (err: Error) => void)

function prependOnceListener(event: "error", listener: (err: Error) => void): this

매개 변수

event

"error"

listener

(err: Error) => void

반환

this

prependOnceListener("readable", () => void)

function prependOnceListener(event: "readable", listener: () => void): this

매개 변수

event

"readable"

listener

() => void

반환

this

prependOnceListener(string | symbol, (args: any[]) => void)

function prependOnceListener(event: string | symbol, listener: (args: any[]) => void): this

매개 변수

event

string | symbol

listener

(args: any[]) => void

반환

this

push(any, string)

function push(chunk: any, encoding?: string): boolean

매개 변수

chunk

any

encoding

string

반환

boolean

rawListeners(string | symbol)

function rawListeners(event: string | symbol): Function[]

매개 변수

event

string | symbol

반환

Function[]

read(number)

function read(size?: number): any

매개 변수

size

number

반환

any

ref()

function ref(): any

반환

any

removeAllListeners(string | symbol)

function removeAllListeners(event?: string | symbol): this

매개 변수

event

string | symbol

반환

this

removeListener(string | symbol, (args: any[]) => void)

function removeListener(event: string | symbol, listener: (args: any[]) => void): this

매개 변수

event

string | symbol

listener

(args: any[]) => void

반환

this

resume()

function resume(): this

반환

this

setDefaultEncoding(string)

function setDefaultEncoding(encoding: string): this

매개 변수

encoding

string

반환

this

setEncoding(string)

function setEncoding(encoding: string): this

매개 변수

encoding

string

반환

this

setKeepAlive(boolean, number)

function setKeepAlive(enable?: boolean, initialDelay?: number): this

매개 변수

enable

boolean

initialDelay

number

반환

this

setMaxListeners(number)

function setMaxListeners(n: number): this

매개 변수

n

number

반환

this

setNoDelay(boolean)

function setNoDelay(noDelay?: boolean): this

매개 변수

noDelay

boolean

반환

this

setTimeout(number, () => void)

function setTimeout(timeout: number, callback?: () => void): this

매개 변수

timeout

number

callback

() => void

반환

this

uncork()

function uncork()

unpipe(any)

function unpipe(destination?: any): this

매개 변수

destination

any

반환

this

unref()

function unref(): any

반환

any

unshift(any)

function unshift(chunk: any)

매개 변수

chunk

any

wrap(any)

function wrap(oldStream: any): this

매개 변수

oldStream

any

반환

this

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

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

write(any, string, Function)

function write(data: any, encoding?: string, callback?: Function)

매개 변수

data

any

encoding

string

callback

Function

write(string, Function)

function write(str: string, cb?: Function): boolean

매개 변수

str

string

cb

Function

반환

boolean

write(string, string, Function)

function write(str: string, encoding?: string, cb?: Function): boolean

매개 변수

str

string

encoding

string

cb

Function

반환

boolean

write(string, string, string)

function write(str: string, encoding?: string, fd?: string): boolean

매개 변수

str

string

encoding

string

fd

string

반환

boolean

write(ValidBuffer)

function write(buffer: ValidBuffer): boolean

매개 변수

buffer
ValidBuffer

반환

boolean

write(ValidBuffer, (err?: Error) => void)

function write(buffer: ValidBuffer, cb?: (err?: Error) => void): boolean

매개 변수

buffer
ValidBuffer
cb

(err?: Error) => void

반환

boolean