Search
Preparing search index...
The search index is not available
u-http-server
Options
All
Public
Public/Protected
All
Inherited
Only exported
Menu
Globals
"net"
Server
Class Server
Hierarchy
EventEmitter
Server
Server
Server
Http2Server
Index
Constructors
constructor
Properties
connections
listening
max
Connections
default
Max
Listeners
Methods
add
Listener
address
close
emit
event
Names
get
Connections
get
Max
Listeners
listen
listener
Count
listeners
off
on
once
prepend
Listener
prepend
Once
Listener
raw
Listeners
ref
remove
All
Listeners
remove
Listener
set
Max
Listeners
unref
listener
Count
Constructors
constructor
new
Server
(
connectionListener
?:
function
)
:
Server
new
Server
(
options
?:
object
, connectionListener
?:
function
)
:
Server
Parameters
Optional
connectionListener:
function
(
socket
:
Socket
)
:
void
Parameters
socket:
Socket
Returns
void
Returns
Server
Parameters
Optional
options:
object
Optional
allow
Half
Open
?:
boolean
Optional
pause
OnConnect
?:
boolean
Optional
connectionListener:
function
(
socket
:
Socket
)
:
void
Parameters
socket:
Socket
Returns
void
Returns
Server
Properties
connections
connections
:
number
listening
listening
:
boolean
max
Connections
max
Connections
:
number
Static
default
Max
Listeners
default
Max
Listeners
:
number
Methods
add
Listener
add
Listener
(
event
:
string
, listener
:
function
)
:
this
add
Listener
(
event
:
"close"
, listener
:
function
)
:
this
add
Listener
(
event
:
"connection"
, listener
:
function
)
:
this
add
Listener
(
event
:
"error"
, listener
:
function
)
:
this
add
Listener
(
event
:
"listening"
, listener
:
function
)
:
this
events.EventEmitter
close
connection
error
listening
Parameters
event:
string
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
Parameters
event:
"close"
listener:
function
(
)
:
void
Returns
void
Returns
this
Parameters
event:
"connection"
listener:
function
(
socket
:
Socket
)
:
void
Parameters
socket:
Socket
Returns
void
Returns
this
Parameters
event:
"error"
listener:
function
(
err
:
Error
)
:
void
Parameters
err:
Error
Returns
void
Returns
this
Parameters
event:
"listening"
listener:
function
(
)
:
void
Returns
void
Returns
this
address
address
(
)
:
AddressInfo
|
string
|
null
Returns
AddressInfo
|
string
|
null
close
close
(
callback
?:
function
)
:
this
Parameters
Optional
callback:
function
(
err
?:
Error
)
:
void
Parameters
Optional
err:
Error
Returns
void
Returns
this
emit
emit
(
event
:
string
|
symbol
,
...
args
:
any
[]
)
:
boolean
emit
(
event
:
"close"
)
:
boolean
emit
(
event
:
"connection"
, socket
:
Socket
)
:
boolean
emit
(
event
:
"error"
, err
:
Error
)
:
boolean
emit
(
event
:
"listening"
)
:
boolean
Parameters
event:
string
|
symbol
Rest
...
args:
any
[]
Returns
boolean
Parameters
event:
"close"
Returns
boolean
Parameters
event:
"connection"
socket:
Socket
Returns
boolean
Parameters
event:
"error"
err:
Error
Returns
boolean
Parameters
event:
"listening"
Returns
boolean
event
Names
event
Names
(
)
:
Array
<
string
|
symbol
>
Returns
Array
<
string
|
symbol
>
get
Connections
get
Connections
(
cb
:
function
)
:
void
Parameters
cb:
function
(
error
:
Error
|
null
, count
:
number
)
:
void
Parameters
error:
Error
|
null
count:
number
Returns
void
Returns
void
get
Max
Listeners
get
Max
Listeners
(
)
:
number
Returns
number
listen
listen
(
port
?:
number
, hostname
?:
string
, backlog
?:
number
, listeningListener
?:
function
)
:
this
listen
(
port
?:
number
, hostname
?:
string
, listeningListener
?:
function
)
:
this
listen
(
port
?:
number
, backlog
?:
number
, listeningListener
?:
function
)
:
this
listen
(
port
?:
number
, listeningListener
?:
function
)
:
this
listen
(
path
:
string
, backlog
?:
number
, listeningListener
?:
function
)
:
this
listen
(
path
:
string
, listeningListener
?:
function
)
:
this
listen
(
options
:
ListenOptions
, listeningListener
?:
function
)
:
this
listen
(
handle
:
any
, backlog
?:
number
, listeningListener
?:
function
)
:
this
listen
(
handle
:
any
, listeningListener
?:
function
)
:
this
Parameters
Optional
port:
number
Optional
hostname:
string
Optional
backlog:
number
Optional
listeningListener:
function
(
)
:
void
Returns
void
Returns
this
Parameters
Optional
port:
number
Optional
hostname:
string
Optional
listeningListener:
function
(
)
:
void
Returns
void
Returns
this
Parameters
Optional
port:
number
Optional
backlog:
number
Optional
listeningListener:
function
(
)
:
void
Returns
void
Returns
this
Parameters
Optional
port:
number
Optional
listeningListener:
function
(
)
:
void
Returns
void
Returns
this
Parameters
path:
string
Optional
backlog:
number
Optional
listeningListener:
function
(
)
:
void
Returns
void
Returns
this
Parameters
path:
string
Optional
listeningListener:
function
(
)
:
void
Returns
void
Returns
this
Parameters
options:
ListenOptions
Optional
listeningListener:
function
(
)
:
void
Returns
void
Returns
this
Parameters
handle:
any
Optional
backlog:
number
Optional
listeningListener:
function
(
)
:
void
Returns
void
Returns
this
Parameters
handle:
any
Optional
listeningListener:
function
(
)
:
void
Returns
void
Returns
this
listener
Count
listener
Count
(
type
:
string
|
symbol
)
:
number
Parameters
type:
string
|
symbol
Returns
number
listeners
listeners
(
event
:
string
|
symbol
)
:
Function
[]
Parameters
event:
string
|
symbol
Returns
Function
[]
off
off
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
on
on
(
event
:
string
, listener
:
function
)
:
this
on
(
event
:
"close"
, listener
:
function
)
:
this
on
(
event
:
"connection"
, listener
:
function
)
:
this
on
(
event
:
"error"
, listener
:
function
)
:
this
on
(
event
:
"listening"
, listener
:
function
)
:
this
Parameters
event:
string
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
Parameters
event:
"close"
listener:
function
(
)
:
void
Returns
void
Returns
this
Parameters
event:
"connection"
listener:
function
(
socket
:
Socket
)
:
void
Parameters
socket:
Socket
Returns
void
Returns
this
Parameters
event:
"error"
listener:
function
(
err
:
Error
)
:
void
Parameters
err:
Error
Returns
void
Returns
this
Parameters
event:
"listening"
listener:
function
(
)
:
void
Returns
void
Returns
this
once
once
(
event
:
string
, listener
:
function
)
:
this
once
(
event
:
"close"
, listener
:
function
)
:
this
once
(
event
:
"connection"
, listener
:
function
)
:
this
once
(
event
:
"error"
, listener
:
function
)
:
this
once
(
event
:
"listening"
, listener
:
function
)
:
this
Parameters
event:
string
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
Parameters
event:
"close"
listener:
function
(
)
:
void
Returns
void
Returns
this
Parameters
event:
"connection"
listener:
function
(
socket
:
Socket
)
:
void
Parameters
socket:
Socket
Returns
void
Returns
this
Parameters
event:
"error"
listener:
function
(
err
:
Error
)
:
void
Parameters
err:
Error
Returns
void
Returns
this
Parameters
event:
"listening"
listener:
function
(
)
:
void
Returns
void
Returns
this
prepend
Listener
prepend
Listener
(
event
:
string
, listener
:
function
)
:
this
prepend
Listener
(
event
:
"close"
, listener
:
function
)
:
this
prepend
Listener
(
event
:
"connection"
, listener
:
function
)
:
this
prepend
Listener
(
event
:
"error"
, listener
:
function
)
:
this
prepend
Listener
(
event
:
"listening"
, listener
:
function
)
:
this
Parameters
event:
string
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
Parameters
event:
"close"
listener:
function
(
)
:
void
Returns
void
Returns
this
Parameters
event:
"connection"
listener:
function
(
socket
:
Socket
)
:
void
Parameters
socket:
Socket
Returns
void
Returns
this
Parameters
event:
"error"
listener:
function
(
err
:
Error
)
:
void
Parameters
err:
Error
Returns
void
Returns
this
Parameters
event:
"listening"
listener:
function
(
)
:
void
Returns
void
Returns
this
prepend
Once
Listener
prepend
Once
Listener
(
event
:
string
, listener
:
function
)
:
this
prepend
Once
Listener
(
event
:
"close"
, listener
:
function
)
:
this
prepend
Once
Listener
(
event
:
"connection"
, listener
:
function
)
:
this
prepend
Once
Listener
(
event
:
"error"
, listener
:
function
)
:
this
prepend
Once
Listener
(
event
:
"listening"
, listener
:
function
)
:
this
Parameters
event:
string
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
Parameters
event:
"close"
listener:
function
(
)
:
void
Returns
void
Returns
this
Parameters
event:
"connection"
listener:
function
(
socket
:
Socket
)
:
void
Parameters
socket:
Socket
Returns
void
Returns
this
Parameters
event:
"error"
listener:
function
(
err
:
Error
)
:
void
Parameters
err:
Error
Returns
void
Returns
this
Parameters
event:
"listening"
listener:
function
(
)
:
void
Returns
void
Returns
this
raw
Listeners
raw
Listeners
(
event
:
string
|
symbol
)
:
Function
[]
Parameters
event:
string
|
symbol
Returns
Function
[]
ref
ref
(
)
:
this
Returns
this
remove
All
Listeners
remove
All
Listeners
(
event
?:
string
|
symbol
)
:
this
Parameters
Optional
event:
string
|
symbol
Returns
this
remove
Listener
remove
Listener
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
set
Max
Listeners
set
Max
Listeners
(
n
:
number
)
:
this
Parameters
n:
number
Returns
this
unref
unref
(
)
:
this
Returns
this
Static
listener
Count
listener
Count
(
emitter
:
EventEmitter
, event
:
string
|
symbol
)
:
number
deprecated
since v4.0.0
Parameters
emitter:
EventEmitter
event:
string
|
symbol
Returns
number
Globals
"http"
"http2"
"https"
"net"
"tls"
generate
Self
Signed
Certificate
parse
Cookie
path
ToRegex
session
InMemory
Server
constructor
connections
listening
max
Connections
default
Max
Listeners
add
Listener
address
close
emit
event
Names
get
Connections
get
Max
Listeners
listen
listener
Count
listeners
off
on
once
prepend
Listener
prepend
Once
Listener
raw
Listeners
ref
remove
All
Listeners
remove
Listener
set
Max
Listeners
unref
listener
Count
Socket
Address
Info
Ipc
Net
Connect
Opts
Ipc
Socket
Connect
Opts
Listen
Options
Socket
Constructor
Opts
Tcp
Net
Connect
Opts
Tcp
Socket
Connect
Opts
Lookup
Function
Net
Connect
Opts
Socket
Connect
Opts
connect
create
Connection
create
Server
isIP
isIPv4
isIPv6
Generated using
TypeDoc
events.EventEmitter