次の方法で共有


INodeSocket interface

Node.jsのモジュールの net Socket を表します。 このインターフェイスはフレームワークをサポートしており、コードに対して直接呼び出すことを意図したものではありません。

プロパティ

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