Search
Preparing search index...
The search index is not available
DefinitelyTyped
Inherited
Private
Externals
Only exported
dgram
Socket
Class Socket
Hierarchy
EventEmitter
Socket
Index
Properties
address
Methods
addListener
addMembership
bind
close
dropMembership
emit
listeners
on
once
removeAllListeners
removeListener
send
setBroadcast
setMaxListeners
setMulticastLoopback
setMulticastTTL
Properties
public
address
:
{ address: string; family: string; port: number; }
public
address.address
:
string
public
address.family
:
string
public
address.port
:
number
Methods
public
addListener
(
event
:
string
, listener
:
Function
)
:
EventEmitter
Parameters
event:
string
listener:
Function
Returns
EventEmitter
public
addMembership
(
multicastAddress
:
string
, multicastInterface
?:
string
)
Parameters
multicastAddress:
string
multicastInterface?:
string
optional
public
bind
(
port
:
number
, address
?:
string
, callback
?:
() => void
)
Parameters
port:
number
address?:
string
optional
callback?:
() => void
optional
public
close
(
)
public
dropMembership
(
multicastAddress
:
string
, multicastInterface
?:
string
)
Parameters
multicastAddress:
string
multicastInterface?:
string
optional
public
emit
(
event
:
string
, args
?:
Array<any>
)
:
boolean
Parameters
event:
string
args?:
Array<any>
optional
Returns
boolean
public
listeners
(
event
:
string
)
:
Array<Function>
Parameters
event:
string
Returns
Array<Function>
public
on
(
event
:
string
, listener
:
Function
)
:
EventEmitter
Parameters
event:
string
listener:
Function
Returns
EventEmitter
public
once
(
event
:
string
, listener
:
Function
)
:
EventEmitter
Parameters
event:
string
listener:
Function
Returns
EventEmitter
public
removeAllListeners
(
event
?:
string
)
:
EventEmitter
Parameters
event?:
string
optional
Returns
EventEmitter
public
removeListener
(
event
:
string
, listener
:
Function
)
:
EventEmitter
Parameters
event:
string
listener:
Function
Returns
EventEmitter
public
send
(
buf
:
Buffer
, offset
:
number
, length
:
number
, port
:
number
, address
:
string
, callback
?:
(error: Error, bytes: number) => void
)
Parameters
buf:
Buffer
offset:
number
length:
number
port:
number
address:
string
callback?:
(error: Error, bytes: number) => void
optional
public
setBroadcast
(
flag
:
boolean
)
Parameters
flag:
boolean
public
setMaxListeners
(
n
:
number
)
Parameters
n:
number
public
setMulticastLoopback
(
flag
:
boolean
)
Parameters
flag:
boolean
public
setMulticastTTL
(
ttl
:
number
)
Parameters
ttl:
number
Globals
NodeJS
Vinyl
assert
buffer
child_process
cluster
crypto
dgram
dns
domain
events
fs
http
https
net
os
path
punycode
querystring
readline
repl
stream
string_decoder
tls
tty
url
util
vinyl
vinyl-fs
vm
zlib
Socket
address
addListener
addMembership
bind
close
dropMembership
emit
listeners
on
once
removeAllListeners
removeListener
send
setBroadcast
setMaxListeners
setMulticastLoopback
setMulticastTTL
createSocket