Interface Socket
Hierarchy
-
Duplex
- Socket
Implements
Index
Constructors
Properties
Methods
- _read
- _write
- add
Listener - address
- connect
- destroy
- emit
- end
- event
Names - get
Max Listeners - is
Paused - listener
Count - listeners
- on
- once
- pause
- pipe
- prepend
Listener - prepend
Once Listener - push
- read
- ref
- remove
All Listeners - remove
Listener - resume
- set
Default Encoding - set
Encoding - set
Keep Alive - set
Max Listeners - set
NoDelay - set
Timeout - unpipe
- unref
- unshift
- wrap
- write
- listener
Count
Constructors
constructor
-
Parameters
-
Optional opts: DuplexOptions
Returns Socket
-
Properties
bufferSize
bytesRead
bytesWritten
connecting
destroyed
localAddress
localPort
readable
remoteAddress
remoteFamily
remotePort
writable
Static defaultMaxListeners
Methods
_read
-
Parameters
-
size: number
Returns void
-
_write
-
Parameters
-
chunk: any
-
encoding: string
-
callback: Function
Returns void
-
addListener
-
Parameters
-
event: string
-
listener: Function
Returns this
-
-
Parameters
-
event: "close"
-
listener: function
-
-
Parameters
-
had_error: boolean
Returns void
-
-
-
Returns this
-
-
Parameters
-
event: "connect"
-
listener: function
-
-
Returns void
-
-
Returns this
-
-
Parameters
-
event: "data"
-
listener: function
-
-
Parameters
-
data: Buffer
Returns void
-
-
-
Returns this
-
-
Parameters
-
event: "drain"
-
listener: function
-
-
Returns void
-
-
Returns this
-
-
Parameters
-
event: "end"
-
listener: function
-
-
Returns void
-
-
Returns this
-
-
Parameters
-
event: "error"
-
listener: function
-
-
Parameters
-
err: Error
Returns void
-
-
-
Returns this
-
-
Parameters
-
event: "lookup"
-
listener: function
-
-
Parameters
-
err: Error
-
address: string
-
family: string | number
-
host: string
Returns void
-
-
-
Returns this
-
-
Parameters
-
event: "timeout"
-
listener: function
-
-
Returns void
-
-
Returns this
-
address
-
Returns object
-
address: string
-
family: string
-
port: number
-
connect
-
Parameters
-
port: number
-
Optional host: string
-
Optional connectionListener: Function
Returns void
-
-
Parameters
-
path: string
-
Optional connectionListener: Function
Returns void
-
destroy
-
Returns void
emit
-
Parameters
-
event: string | symbol
-
Rest ...args: any[]
Returns boolean
-
-
Parameters
-
event: "close"
-
had_error: boolean
Returns boolean
-
-
Parameters
-
event: "connect"
Returns boolean
-
-
Parameters
-
event: "data"
-
data: Buffer
Returns boolean
-
-
Parameters
-
event: "drain"
Returns boolean
-
-
Parameters
-
event: "end"
Returns boolean
-
-
Parameters
-
event: "error"
-
err: Error
Returns boolean
-
-
Parameters
-
event: "lookup"
-
err: Error
-
address: string
-
family: string | number
-
host: string
Returns boolean
-
-
Parameters
-
event: "timeout"
Returns boolean
-
end
-
Returns void
-
Parameters
-
buffer: Buffer
-
Optional cb: Function
Returns void
-
-
Parameters
-
str: string
-
Optional cb: Function
Returns void
-
-
Parameters
-
str: string
-
Optional encoding: string
-
Optional cb: Function
Returns void
-
-
Parameters
-
Optional data: any
-
Optional encoding: string
Returns void
-
eventNames
-
Returns (string | symbol)[]
getMaxListeners
-
Returns number
isPaused
-
Returns boolean
listenerCount
-
Parameters
-
type: string | symbol
Returns number
-
listeners
-
Parameters
-
event: string | symbol
Returns Function[]
-
on
-
Parameters
-
event: string
-
listener: Function
Returns this
-
-
Parameters
-
event: "close"
-
listener: function
-
-
Parameters
-
had_error: boolean
Returns void
-
-
-
Returns this
-
-
Parameters
-
event: "connect"
-
listener: function
-
-
Returns void
-
-
Returns this
-
-
Parameters
-
event: "data"
-
listener: function
-
-
Parameters
-
data: Buffer
Returns void
-
-
-
Returns this
-
-
Parameters
-
event: "drain"
-
listener: function
-
-
Returns void
-
-
Returns this
-
-
Parameters
-
event: "end"
-
listener: function
-
-
Returns void
-
-
Returns this
-
-
Parameters
-
event: "error"
-
listener: function
-
-
Parameters
-
err: Error
Returns void
-
-
-
Returns this
-
-
Parameters
-
event: "lookup"
-
listener: function
-
-
Parameters
-
err: Error
-
address: string
-
family: string | number
-
host: string
Returns void
-
-
-
Returns this
-
-
Parameters
-
event: "timeout"
-
listener: function
-
-
Returns void
-
-
Returns this
-
once
-
Parameters
-
event: string
-
listener: Function
Returns this
-
-
Parameters
-
event: "close"
-
listener: function
-
-
Parameters
-
had_error: boolean
Returns void
-
-
-
Returns this
-
-
Parameters
-
event: "connect"
-
listener: function
-
-
Returns void
-
-
Returns this
-
-
Parameters
-
event: "data"
-
listener: function
-
-
Parameters
-
data: Buffer
Returns void
-
-
-
Returns this
-
-
Parameters
-
event: "drain"
-
listener: function
-
-
Returns void
-
-
Returns this
-
-
Parameters
-
event: "end"
-
listener: function
-
-
Returns void
-
-
Returns this
-
-
Parameters
-
event: "error"
-
listener: function
-
-
Parameters
-
err: Error
Returns void
-
-
-
Returns this
-
-
Parameters
-
event: "lookup"
-
listener: function
-
-
Parameters
-
err: Error
-
address: string
-
family: string | number
-
host: string
Returns void
-
-
-
Returns this
-
-
Parameters
-
event: "timeout"
-
listener: function
-
-
Returns void
-
-
Returns this
-
pause
-
Returns this
pipe
-
Type parameters
Parameters
-
destination: T
-
Optional options: object
-
Optional end?: boolean
-
Returns T
-
prependListener
-
Parameters
-
event: string
-
listener: Function
Returns this
-
-
Parameters
-
event: "close"
-
listener: function
-
-
Parameters
-
had_error: boolean
Returns void
-
-
-
Returns this
-
-
Parameters
-
event: "connect"
-
listener: function
-
-
Returns void
-
-
Returns this
-
-
Parameters
-
event: "data"
-
listener: function
-
-
Parameters
-
data: Buffer
Returns void
-
-
-
Returns this
-
-
Parameters
-
event: "drain"
-
listener: function
-
-
Returns void
-
-
Returns this
-
-
Parameters
-
event: "end"
-
listener: function
-
-
Returns void
-
-
Returns this
-
-
Parameters
-
event: "error"
-
listener: function
-
-
Parameters
-
err: Error
Returns void
-
-
-
Returns this
-
-
Parameters
-
event: "lookup"
-
listener: function
-
-
Parameters
-
err: Error
-
address: string
-
family: string | number
-
host: string
Returns void
-
-
-
Returns this
-
-
Parameters
-
event: "timeout"
-
listener: function
-
-
Returns void
-
-
Returns this
-
prependOnceListener
-
Parameters
-
event: string
-
listener: Function
Returns this
-
-
Parameters
-
event: "close"
-
listener: function
-
-
Parameters
-
had_error: boolean
Returns void
-
-
-
Returns this
-
-
Parameters
-
event: "connect"
-
listener: function
-
-
Returns void
-
-
Returns this
-
-
Parameters
-
event: "data"
-
listener: function
-
-
Parameters
-
data: Buffer
Returns void
-
-
-
Returns this
-
-
Parameters
-
event: "drain"
-
listener: function
-
-
Returns void
-
-
Returns this
-
-
Parameters
-
event: "end"
-
listener: function
-
-
Returns void
-
-
Returns this
-
-
Parameters
-
event: "error"
-
listener: function
-
-
Parameters
-
err: Error
Returns void
-
-
-
Returns this
-
-
Parameters
-
event: "lookup"
-
listener: function
-
-
Parameters
-
err: Error
-
address: string
-
family: string | number
-
host: string
Returns void
-
-
-
Returns this
-
-
Parameters
-
event: "timeout"
-
listener: function
-
-
Returns void
-
-
Returns this
-
push
-
Parameters
-
chunk: any
-
Optional encoding: string
Returns boolean
-
read
-
Parameters
-
Optional size: number
Returns any
-
ref
-
Returns void
removeAllListeners
-
Parameters
-
Optional event: string | symbol
Returns this
-
removeListener
-
Parameters
-
event: string
-
listener: Function
Returns this
-
-
Parameters
-
event: "close"
-
listener: function
-
-
Returns void
-
-
Returns this
-
-
Parameters
-
event: "data"
-
listener: function
-
-
Parameters
-
chunk: Buffer | string
Returns void
-
-
-
Returns this
-
-
Parameters
-
event: "end"
-
listener: function
-
-
Returns void
-
-
Returns this
-
-
Parameters
-
event: "readable"
-
listener: function
-
-
Returns void
-
-
Returns this
-
-
Parameters
-
event: "error"
-
listener: function
-
-
Parameters
-
err: Error
Returns void
-
-
-
Returns this
-
resume
-
Returns this
setDefaultEncoding
-
Parameters
-
encoding: string
Returns this
-
setEncoding
-
Parameters
-
Optional encoding: string
Returns void
-
setKeepAlive
-
Parameters
-
Optional enable: boolean
-
Optional initialDelay: number
Returns void
-
setMaxListeners
-
Parameters
-
n: number
Returns this
-
setNoDelay
-
Parameters
-
Optional noDelay: boolean
Returns void
-
setTimeout
-
Parameters
-
timeout: number
-
Optional callback: Function
Returns void
-
unpipe
-
Type parameters
Parameters
-
Optional destination: T
Returns void
-
unref
-
Returns void
unshift
-
Parameters
-
chunk: any
Returns void
-
wrap
-
Parameters
-
oldStream: ReadableStream
Returns Readable
-
write
-
Parameters
-
buffer: Buffer
Returns boolean
-
-
Parameters
-
buffer: Buffer
-
Optional cb: Function
Returns boolean
-
-
Parameters
-
str: string
-
Optional cb: Function
Returns boolean
-
-
Parameters
-
str: string
-
Optional encoding: string
-
Optional cb: Function
Returns boolean
-
-
Parameters
-
str: string
-
Optional encoding: string
-
Optional fd: string
Returns boolean
-
-
Parameters
-
data: any
-
Optional encoding: string
-
Optional callback: Function
Returns void
-
Static listenerCount
-
Parameters
-
emitter: EventEmitter
-
event: string | symbol
Returns number
-
Generated using TypeDoc
events.EventEmitter