Search
Preparing search index...
The search index is not available
u-http-server
Options
All
Public
Public/Protected
All
Inherited
Only exported
Menu
Globals
"tls"
Server
Class Server
Hierarchy
Server
Server
Server
Http2SecureServer
Index
Constructors
constructor
Properties
connections
listening
max
Connections
default
Max
Listeners
Methods
add
Context
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
Context
add
Context
(
hostName
:
string
, credentials
:
SecureContextOptions
)
:
void
Parameters
hostName:
string
credentials:
SecureContextOptions
Returns
void
add
Listener
add
Listener
(
event
:
string
, listener
:
function
)
:
this
add
Listener
(
event
:
"tlsClientError"
, listener
:
function
)
:
this
add
Listener
(
event
:
"newSession"
, listener
:
function
)
:
this
add
Listener
(
event
:
"OCSPRequest"
, listener
:
function
)
:
this
add
Listener
(
event
:
"resumeSession"
, listener
:
function
)
:
this
add
Listener
(
event
:
"secureConnection"
, listener
:
function
)
:
this
add
Listener
(
event
:
"keylog"
, listener
:
function
)
:
this
events.EventEmitter
tlsClientError
newSession
OCSPRequest
resumeSession
secureConnection
Parameters
event:
string
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
Parameters
event:
"tlsClientError"
listener:
function
(
err
:
Error
, tlsSocket
:
TLSSocket
)
:
void
Parameters
err:
Error
tlsSocket:
TLSSocket
Returns
void
Returns
this
Parameters
event:
"newSession"
listener:
function
(
sessionId
:
Buffer
, sessionData
:
Buffer
, callback
:
function
)
:
void
Parameters
sessionId:
Buffer
sessionData:
Buffer
callback:
function
(
err
:
Error
, resp
:
Buffer
)
:
void
Parameters
err:
Error
resp:
Buffer
Returns
void
Returns
void
Returns
this
Parameters
event:
"OCSPRequest"
listener:
function
(
certificate
:
Buffer
, issuer
:
Buffer
, callback
:
function
)
:
void
Parameters
certificate:
Buffer
issuer:
Buffer
callback:
function
(
err
:
Error
|
null
, resp
:
Buffer
)
:
void
Parameters
err:
Error
|
null
resp:
Buffer
Returns
void
Returns
void
Returns
this
Parameters
event:
"resumeSession"
listener:
function
(
sessionId
:
Buffer
, callback
:
function
)
:
void
Parameters
sessionId:
Buffer
callback:
function
(
err
:
Error
, sessionData
:
Buffer
)
:
void
Parameters
err:
Error
sessionData:
Buffer
Returns
void
Returns
void
Returns
this
Parameters
event:
"secureConnection"
listener:
function
(
tlsSocket
:
TLSSocket
)
:
void
Parameters
tlsSocket:
TLSSocket
Returns
void
Returns
this
Parameters
event:
"keylog"
listener:
function
(
line
:
Buffer
, tlsSocket
:
TLSSocket
)
:
void
Parameters
line:
Buffer
tlsSocket:
TLSSocket
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
:
"tlsClientError"
, err
:
Error
, tlsSocket
:
TLSSocket
)
:
boolean
emit
(
event
:
"newSession"
, sessionId
:
Buffer
, sessionData
:
Buffer
, callback
:
function
)
:
boolean
emit
(
event
:
"OCSPRequest"
, certificate
:
Buffer
, issuer
:
Buffer
, callback
:
function
)
:
boolean
emit
(
event
:
"resumeSession"
, sessionId
:
Buffer
, callback
:
function
)
:
boolean
emit
(
event
:
"secureConnection"
, tlsSocket
:
TLSSocket
)
:
boolean
emit
(
event
:
"keylog"
, line
:
Buffer
, tlsSocket
:
TLSSocket
)
:
boolean
Parameters
event:
string
|
symbol
Rest
...
args:
any
[]
Returns
boolean
Parameters
event:
"tlsClientError"
err:
Error
tlsSocket:
TLSSocket
Returns
boolean
Parameters
event:
"newSession"
sessionId:
Buffer
sessionData:
Buffer
callback:
function
(
err
:
Error
, resp
:
Buffer
)
:
void
Parameters
err:
Error
resp:
Buffer
Returns
void
Returns
boolean
Parameters
event:
"OCSPRequest"
certificate:
Buffer
issuer:
Buffer
callback:
function
(
err
:
Error
|
null
, resp
:
Buffer
)
:
void
Parameters
err:
Error
|
null
resp:
Buffer
Returns
void
Returns
boolean
Parameters
event:
"resumeSession"
sessionId:
Buffer
callback:
function
(
err
:
Error
, sessionData
:
Buffer
)
:
void
Parameters
err:
Error
sessionData:
Buffer
Returns
void
Returns
boolean
Parameters
event:
"secureConnection"
tlsSocket:
TLSSocket
Returns
boolean
Parameters
event:
"keylog"
line:
Buffer
tlsSocket:
TLSSocket
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
:
"tlsClientError"
, listener
:
function
)
:
this
on
(
event
:
"newSession"
, listener
:
function
)
:
this
on
(
event
:
"OCSPRequest"
, listener
:
function
)
:
this
on
(
event
:
"resumeSession"
, listener
:
function
)
:
this
on
(
event
:
"secureConnection"
, listener
:
function
)
:
this
on
(
event
:
"keylog"
, listener
:
function
)
:
this
Parameters
event:
string
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
Parameters
event:
"tlsClientError"
listener:
function
(
err
:
Error
, tlsSocket
:
TLSSocket
)
:
void
Parameters
err:
Error
tlsSocket:
TLSSocket
Returns
void
Returns
this
Parameters
event:
"newSession"
listener:
function
(
sessionId
:
Buffer
, sessionData
:
Buffer
, callback
:
function
)
:
void
Parameters
sessionId:
Buffer
sessionData:
Buffer
callback:
function
(
err
:
Error
, resp
:
Buffer
)
:
void
Parameters
err:
Error
resp:
Buffer
Returns
void
Returns
void
Returns
this
Parameters
event:
"OCSPRequest"
listener:
function
(
certificate
:
Buffer
, issuer
:
Buffer
, callback
:
function
)
:
void
Parameters
certificate:
Buffer
issuer:
Buffer
callback:
function
(
err
:
Error
|
null
, resp
:
Buffer
)
:
void
Parameters
err:
Error
|
null
resp:
Buffer
Returns
void
Returns
void
Returns
this
Parameters
event:
"resumeSession"
listener:
function
(
sessionId
:
Buffer
, callback
:
function
)
:
void
Parameters
sessionId:
Buffer
callback:
function
(
err
:
Error
, sessionData
:
Buffer
)
:
void
Parameters
err:
Error
sessionData:
Buffer
Returns
void
Returns
void
Returns
this
Parameters
event:
"secureConnection"
listener:
function
(
tlsSocket
:
TLSSocket
)
:
void
Parameters
tlsSocket:
TLSSocket
Returns
void
Returns
this
Parameters
event:
"keylog"
listener:
function
(
line
:
Buffer
, tlsSocket
:
TLSSocket
)
:
void
Parameters
line:
Buffer
tlsSocket:
TLSSocket
Returns
void
Returns
this
once
once
(
event
:
string
, listener
:
function
)
:
this
once
(
event
:
"tlsClientError"
, listener
:
function
)
:
this
once
(
event
:
"newSession"
, listener
:
function
)
:
this
once
(
event
:
"OCSPRequest"
, listener
:
function
)
:
this
once
(
event
:
"resumeSession"
, listener
:
function
)
:
this
once
(
event
:
"secureConnection"
, listener
:
function
)
:
this
once
(
event
:
"keylog"
, listener
:
function
)
:
this
Parameters
event:
string
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
Parameters
event:
"tlsClientError"
listener:
function
(
err
:
Error
, tlsSocket
:
TLSSocket
)
:
void
Parameters
err:
Error
tlsSocket:
TLSSocket
Returns
void
Returns
this
Parameters
event:
"newSession"
listener:
function
(
sessionId
:
Buffer
, sessionData
:
Buffer
, callback
:
function
)
:
void
Parameters
sessionId:
Buffer
sessionData:
Buffer
callback:
function
(
err
:
Error
, resp
:
Buffer
)
:
void
Parameters
err:
Error
resp:
Buffer
Returns
void
Returns
void
Returns
this
Parameters
event:
"OCSPRequest"
listener:
function
(
certificate
:
Buffer
, issuer
:
Buffer
, callback
:
function
)
:
void
Parameters
certificate:
Buffer
issuer:
Buffer
callback:
function
(
err
:
Error
|
null
, resp
:
Buffer
)
:
void
Parameters
err:
Error
|
null
resp:
Buffer
Returns
void
Returns
void
Returns
this
Parameters
event:
"resumeSession"
listener:
function
(
sessionId
:
Buffer
, callback
:
function
)
:
void
Parameters
sessionId:
Buffer
callback:
function
(
err
:
Error
, sessionData
:
Buffer
)
:
void
Parameters
err:
Error
sessionData:
Buffer
Returns
void
Returns
void
Returns
this
Parameters
event:
"secureConnection"
listener:
function
(
tlsSocket
:
TLSSocket
)
:
void
Parameters
tlsSocket:
TLSSocket
Returns
void
Returns
this
Parameters
event:
"keylog"
listener:
function
(
line
:
Buffer
, tlsSocket
:
TLSSocket
)
:
void
Parameters
line:
Buffer
tlsSocket:
TLSSocket
Returns
void
Returns
this
prepend
Listener
prepend
Listener
(
event
:
string
, listener
:
function
)
:
this
prepend
Listener
(
event
:
"tlsClientError"
, listener
:
function
)
:
this
prepend
Listener
(
event
:
"newSession"
, listener
:
function
)
:
this
prepend
Listener
(
event
:
"OCSPRequest"
, listener
:
function
)
:
this
prepend
Listener
(
event
:
"resumeSession"
, listener
:
function
)
:
this
prepend
Listener
(
event
:
"secureConnection"
, listener
:
function
)
:
this
prepend
Listener
(
event
:
"keylog"
, listener
:
function
)
:
this
Parameters
event:
string
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
Parameters
event:
"tlsClientError"
listener:
function
(
err
:
Error
, tlsSocket
:
TLSSocket
)
:
void
Parameters
err:
Error
tlsSocket:
TLSSocket
Returns
void
Returns
this
Parameters
event:
"newSession"
listener:
function
(
sessionId
:
Buffer
, sessionData
:
Buffer
, callback
:
function
)
:
void
Parameters
sessionId:
Buffer
sessionData:
Buffer
callback:
function
(
err
:
Error
, resp
:
Buffer
)
:
void
Parameters
err:
Error
resp:
Buffer
Returns
void
Returns
void
Returns
this
Parameters
event:
"OCSPRequest"
listener:
function
(
certificate
:
Buffer
, issuer
:
Buffer
, callback
:
function
)
:
void
Parameters
certificate:
Buffer
issuer:
Buffer
callback:
function
(
err
:
Error
|
null
, resp
:
Buffer
)
:
void
Parameters
err:
Error
|
null
resp:
Buffer
Returns
void
Returns
void
Returns
this
Parameters
event:
"resumeSession"
listener:
function
(
sessionId
:
Buffer
, callback
:
function
)
:
void
Parameters
sessionId:
Buffer
callback:
function
(
err
:
Error
, sessionData
:
Buffer
)
:
void
Parameters
err:
Error
sessionData:
Buffer
Returns
void
Returns
void
Returns
this
Parameters
event:
"secureConnection"
listener:
function
(
tlsSocket
:
TLSSocket
)
:
void
Parameters
tlsSocket:
TLSSocket
Returns
void
Returns
this
Parameters
event:
"keylog"
listener:
function
(
line
:
Buffer
, tlsSocket
:
TLSSocket
)
:
void
Parameters
line:
Buffer
tlsSocket:
TLSSocket
Returns
void
Returns
this
prepend
Once
Listener
prepend
Once
Listener
(
event
:
string
, listener
:
function
)
:
this
prepend
Once
Listener
(
event
:
"tlsClientError"
, listener
:
function
)
:
this
prepend
Once
Listener
(
event
:
"newSession"
, listener
:
function
)
:
this
prepend
Once
Listener
(
event
:
"OCSPRequest"
, listener
:
function
)
:
this
prepend
Once
Listener
(
event
:
"resumeSession"
, listener
:
function
)
:
this
prepend
Once
Listener
(
event
:
"secureConnection"
, listener
:
function
)
:
this
prepend
Once
Listener
(
event
:
"keylog"
, listener
:
function
)
:
this
Parameters
event:
string
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
Parameters
event:
"tlsClientError"
listener:
function
(
err
:
Error
, tlsSocket
:
TLSSocket
)
:
void
Parameters
err:
Error
tlsSocket:
TLSSocket
Returns
void
Returns
this
Parameters
event:
"newSession"
listener:
function
(
sessionId
:
Buffer
, sessionData
:
Buffer
, callback
:
function
)
:
void
Parameters
sessionId:
Buffer
sessionData:
Buffer
callback:
function
(
err
:
Error
, resp
:
Buffer
)
:
void
Parameters
err:
Error
resp:
Buffer
Returns
void
Returns
void
Returns
this
Parameters
event:
"OCSPRequest"
listener:
function
(
certificate
:
Buffer
, issuer
:
Buffer
, callback
:
function
)
:
void
Parameters
certificate:
Buffer
issuer:
Buffer
callback:
function
(
err
:
Error
|
null
, resp
:
Buffer
)
:
void
Parameters
err:
Error
|
null
resp:
Buffer
Returns
void
Returns
void
Returns
this
Parameters
event:
"resumeSession"
listener:
function
(
sessionId
:
Buffer
, callback
:
function
)
:
void
Parameters
sessionId:
Buffer
callback:
function
(
err
:
Error
, sessionData
:
Buffer
)
:
void
Parameters
err:
Error
sessionData:
Buffer
Returns
void
Returns
void
Returns
this
Parameters
event:
"secureConnection"
listener:
function
(
tlsSocket
:
TLSSocket
)
:
void
Parameters
tlsSocket:
TLSSocket
Returns
void
Returns
this
Parameters
event:
"keylog"
listener:
function
(
line
:
Buffer
, tlsSocket
:
TLSSocket
)
:
void
Parameters
line:
Buffer
tlsSocket:
TLSSocket
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
Context
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
TLSSocket
Certificate
Cipher
Name
And
Protocol
Common
Connection
Options
Connection
Options
Detailed
Peer
Certificate
Peer
Certificate
Secure
Context
Secure
Context
Options
Secure
Pair
TLSSocket
Options
Tls
Options
Secure
Version
CLIENT_
RENEG_
LIMIT
CLIENT_
RENEG_
WINDOW
DEFAULT_
ECDH_
CURVE
root
Certificates
check
Server
Identity
connect
create
Secure
Context
create
Secure
Pair
create
Server
get
Ciphers
Generated using
TypeDoc
events.EventEmitter