INodeSocket interface
Representa un socket del módulo net
en Node.js.
Esta interfaz admite el marco y no está pensado para llamarse directamente para el código.
buffer |
|
bytes |
|
bytes |
|
connecting | |
destroyed | |
local |
|
local |
|
readable | |
readable |
|
readable |
|
readable |
|
writable | |
writable |
|
writable |
bufferSize: number
Valor de propiedad
number
bytesRead: number
Valor de propiedad
number
bytesWritten: number
Valor de propiedad
number
connecting: boolean
Valor de propiedad
boolean
destroyed: boolean
Valor de propiedad
boolean
localAddress: string
Valor de propiedad
string
localPort: number
Valor de propiedad
number
readable: boolean
Valor de propiedad
boolean
readableFlowing: boolean | null
Valor de propiedad
boolean | null
readableHighWaterMark: number
Valor de propiedad
number
readableLength: number
Valor de propiedad
number
writable: boolean
Valor de propiedad
boolean
writableHighWaterMark: number
Valor de propiedad
number
writableLength: number
Valor de propiedad
number
function addListener(event: "close", listener: () => void): this
Parámetros
- event
-
"close"
- listener
-
() => void
Devoluciones
this
function addListener(event: "data", listener: (chunk: any) => void): this
Parámetros
- event
-
"data"
- listener
-
(chunk: any) => void
Devoluciones
this
function addListener(event: "end", listener: () => void): this
Parámetros
- event
-
"end"
- listener
-
() => void
Devoluciones
this
function addListener(event: "error", listener: (err: Error) => void): this
Parámetros
- event
-
"error"
- listener
-
(err: Error) => void
Devoluciones
this
function addListener(event: "readable", listener: () => void): this
Parámetros
- event
-
"readable"
- listener
-
() => void
Devoluciones
this
function addListener(event: string | symbol, listener: (args: any[]) => void): this
Parámetros
- event
-
string | symbol
- listener
-
(args: any[]) => void
Devoluciones
this
function connect(options: any, connectionListener?: () => void): any
Parámetros
- options
-
any
- connectionListener
-
() => void
Devoluciones
any
function connect(port: number, connectionListener?: () => void): any
Parámetros
- port
-
number
- connectionListener
-
() => void
Devoluciones
any
function connect(port: number, host: string, connectionListener?: () => void): any
Parámetros
- port
-
number
- host
-
string
- connectionListener
-
() => void
Devoluciones
any
function connect(path: string, connectionListener?: () => void): any
Parámetros
- path
-
string
- connectionListener
-
() => void
Devoluciones
any
function cork()
function destroy(error?: Error)
Parámetros
- error
-
Error
function emit(event: "close"): boolean
Parámetros
- event
-
"close"
Devoluciones
boolean
function emit(event: "data", chunk: any): boolean
Parámetros
- event
-
"data"
- chunk
-
any
Devoluciones
boolean
function emit(event: "end"): boolean
Parámetros
- event
-
"end"
Devoluciones
boolean
function emit(event: "error", err: Error): boolean
Parámetros
- event
-
"error"
- err
-
Error
Devoluciones
boolean
function emit(event: "readable"): boolean
Parámetros
- event
-
"readable"
Devoluciones
boolean
function emit(event: string | symbol, args: any[]): boolean
Parámetros
- event
-
string | symbol
- args
-
any[]
Devoluciones
boolean
function end(cb?: () => void)
Parámetros
- cb
-
() => void
function end(chunk: any, cb?: () => void)
Parámetros
- chunk
-
any
- cb
-
() => void
function end(chunk: any, encoding?: string, cb?: () => void)
Parámetros
- chunk
-
any
- encoding
-
string
- cb
-
() => void
function eventNames(): Array<string | symbol>
Devoluciones
Array<string | symbol>
function getMaxListeners(): number
Devoluciones
number
function isPaused(): boolean
Devoluciones
boolean
function listenerCount(type: string | symbol): number
Parámetros
- type
-
string | symbol
Devoluciones
number
function listeners(event: string | symbol): Function[]
Parámetros
- event
-
string | symbol
Devoluciones
Function[]
function off(event: string | symbol, listener: (args: any[]) => void): this
Parámetros
- event
-
string | symbol
- listener
-
(args: any[]) => void
Devoluciones
this
function on(event: "close", listener: (had_error: boolean) => void): this
Parámetros
- event
-
"close"
- listener
-
(had_error: boolean) => void
Devoluciones
this
function on(event: "connect", listener: () => void): this
Parámetros
- event
-
"connect"
- listener
-
() => void
Devoluciones
this
function on(event: "data", listener: (data: INodeBuffer) => void): this
Parámetros
- event
-
"data"
- listener
-
(data: INodeBuffer) => void
Devoluciones
this
function on(event: "end", listener: () => void): this
Parámetros
- event
-
"end"
- listener
-
() => void
Devoluciones
this
function on(event: "error", listener: (err: Error) => void): this
Parámetros
- event
-
"error"
- listener
-
(err: Error) => void
Devoluciones
this
function on(event: string, listener: (args: any[]) => void): this
Parámetros
- event
-
string
- listener
-
(args: any[]) => void
Devoluciones
this
function once(event: "close", listener: () => void): this
Parámetros
- event
-
"close"
- listener
-
() => void
Devoluciones
this
function once(event: "data", listener: (chunk: any) => void): this
Parámetros
- event
-
"data"
- listener
-
(chunk: any) => void
Devoluciones
this
function once(event: "end", listener: () => void): this
Parámetros
- event
-
"end"
- listener
-
() => void
Devoluciones
this
function once(event: "error", listener: (err: Error) => void): this
Parámetros
- event
-
"error"
- listener
-
(err: Error) => void
Devoluciones
this
function once(event: "readable", listener: () => void): this
Parámetros
- event
-
"readable"
- listener
-
() => void
Devoluciones
this
function once(event: string | symbol, listener: (args: any[]) => void): this
Parámetros
- event
-
string | symbol
- listener
-
(args: any[]) => void
Devoluciones
this
function pause(): this
Devoluciones
this
function pipe<T>(destination: T, options?: { end?: boolean }): T
Parámetros
- destination
-
T
- options
-
{ end?: boolean }
Devoluciones
T
function prependListener(event: "close", listener: () => void): this
Parámetros
- event
-
"close"
- listener
-
() => void
Devoluciones
this
function prependListener(event: "data", listener: (chunk: any) => void): this
Parámetros
- event
-
"data"
- listener
-
(chunk: any) => void
Devoluciones
this
function prependListener(event: "end", listener: () => void): this
Parámetros
- event
-
"end"
- listener
-
() => void
Devoluciones
this
function prependListener(event: "error", listener: (err: Error) => void): this
Parámetros
- event
-
"error"
- listener
-
(err: Error) => void
Devoluciones
this
function prependListener(event: "readable", listener: () => void): this
Parámetros
- event
-
"readable"
- listener
-
() => void
Devoluciones
this
function prependListener(event: string | symbol, listener: (args: any[]) => void): this
Parámetros
- event
-
string | symbol
- listener
-
(args: any[]) => void
Devoluciones
this
function prependOnceListener(event: "close", listener: () => void): this
Parámetros
- event
-
"close"
- listener
-
() => void
Devoluciones
this
function prependOnceListener(event: "data", listener: (chunk: any) => void): this
Parámetros
- event
-
"data"
- listener
-
(chunk: any) => void
Devoluciones
this
function prependOnceListener(event: "end", listener: () => void): this
Parámetros
- event
-
"end"
- listener
-
() => void
Devoluciones
this
function prependOnceListener(event: "error", listener: (err: Error) => void): this
Parámetros
- event
-
"error"
- listener
-
(err: Error) => void
Devoluciones
this
function prependOnceListener(event: "readable", listener: () => void): this
Parámetros
- event
-
"readable"
- listener
-
() => void
Devoluciones
this
function prependOnceListener(event: string | symbol, listener: (args: any[]) => void): this
Parámetros
- event
-
string | symbol
- listener
-
(args: any[]) => void
Devoluciones
this
function push(chunk: any, encoding?: string): boolean
Parámetros
- chunk
-
any
- encoding
-
string
Devoluciones
boolean
function rawListeners(event: string | symbol): Function[]
Parámetros
- event
-
string | symbol
Devoluciones
Function[]
function read(size?: number): any
Parámetros
- size
-
number
Devoluciones
any
function ref(): any
Devoluciones
any
function removeAllListeners(event?: string | symbol): this
Parámetros
- event
-
string | symbol
Devoluciones
this
function removeListener(event: string | symbol, listener: (args: any[]) => void): this
Parámetros
- event
-
string | symbol
- listener
-
(args: any[]) => void
Devoluciones
this
function resume(): this
Devoluciones
this
function setDefaultEncoding(encoding: string): this
Parámetros
- encoding
-
string
Devoluciones
this
function setEncoding(encoding: string): this
Parámetros
- encoding
-
string
Devoluciones
this
function setKeepAlive(enable?: boolean, initialDelay?: number): this
Parámetros
- enable
-
boolean
- initialDelay
-
number
Devoluciones
this
function setMaxListeners(n: number): this
Parámetros
- n
-
number
Devoluciones
this
function setNoDelay(noDelay?: boolean): this
Parámetros
- noDelay
-
boolean
Devoluciones
this
function setTimeout(timeout: number, callback?: () => void): this
Parámetros
- timeout
-
number
- callback
-
() => void
Devoluciones
this
function uncork()
function unpipe(destination?: any): this
Parámetros
- destination
-
any
Devoluciones
this
function unref(): any
Devoluciones
any
function unshift(chunk: any)
Parámetros
- chunk
-
any
function wrap(oldStream: any): this
Parámetros
- oldStream
-
any
Devoluciones
this
function write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean
Parámetros
- chunk
-
any
- cb
-
(error: Error | null | undefined) => void
Devoluciones
boolean
function write(chunk: any, encoding?: string, cb?: (error: Error | null | undefined) => void): boolean
Parámetros
- chunk
-
any
- encoding
-
string
- cb
-
(error: Error | null | undefined) => void
Devoluciones
boolean
function write(data: any, encoding?: string, callback?: Function)
Parámetros
- data
-
any
- encoding
-
string
- callback
-
Function
function write(str: string, cb?: Function): boolean
Parámetros
- str
-
string
- cb
-
Function
Devoluciones
boolean
function write(str: string, encoding?: string, cb?: Function): boolean
Parámetros
- str
-
string
- encoding
-
string
- cb
-
Function
Devoluciones
boolean
function write(str: string, encoding?: string, fd?: string): boolean
Parámetros
- str
-
string
- encoding
-
string
- fd
-
string
Devoluciones
boolean
function write(buffer: ValidBuffer, cb?: (err?: Error) => void): boolean
Parámetros
- buffer
- ValidBuffer
- cb
-
(err?: Error) => void
Devoluciones
boolean