Search
Preparing search index...
The search index is not available
u-http-server
Options
All
Public
Public/Protected
All
Inherited
Only exported
Menu
Globals
"http2"
ClientHttp2Session
Class ClientHttp2Session
Hierarchy
Http2Session
ClientHttp2Session
Index
Constructors
constructor
Properties
alpn
Protocol
closed
connecting
destroyed
encrypted
local
Settings
origin
Set
pending
Settings
Ack
remote
Settings
socket
state
type
default
Max
Listeners
Methods
add
Listener
close
destroy
emit
event
Names
get
Max
Listeners
goaway
listener
Count
listeners
off
on
once
ping
prepend
Listener
prepend
Once
Listener
raw
Listeners
ref
remove
All
Listeners
remove
Listener
request
set
Max
Listeners
set
Timeout
settings
unref
listener
Count
Constructors
Private
constructor
new
Client
Http2
Session
(
)
:
ClientHttp2Session
Returns
ClientHttp2Session
Properties
Optional
alpn
Protocol
alpn
Protocol
:
string
closed
closed
:
boolean
connecting
connecting
:
boolean
destroyed
destroyed
:
boolean
Optional
encrypted
encrypted
:
boolean
local
Settings
local
Settings
:
Settings
Optional
origin
Set
origin
Set
:
string
[]
pending
Settings
Ack
pending
Settings
Ack
:
boolean
remote
Settings
remote
Settings
:
Settings
socket
socket
:
Socket
|
TLSSocket
state
state
:
SessionState
type
type
:
number
Static
default
Max
Listeners
default
Max
Listeners
:
number
Methods
add
Listener
add
Listener
(
event
:
"altsvc"
, listener
:
function
)
:
this
add
Listener
(
event
:
"origin"
, listener
:
function
)
:
this
add
Listener
(
event
:
"connect"
, listener
:
function
)
:
this
add
Listener
(
event
:
"stream"
, listener
:
function
)
:
this
add
Listener
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
"altsvc"
listener:
function
(
alt
:
string
, origin
:
string
, stream
:
number
)
:
void
Parameters
alt:
string
origin:
string
stream:
number
Returns
void
Returns
this
Parameters
event:
"origin"
listener:
function
(
origins
:
string
[]
)
:
void
Parameters
origins:
string
[]
Returns
void
Returns
this
Parameters
event:
"connect"
listener:
function
(
session
:
ClientHttp2Session
, socket
:
Socket
|
TLSSocket
)
:
void
Parameters
session:
ClientHttp2Session
socket:
Socket
|
TLSSocket
Returns
void
Returns
this
Parameters
event:
"stream"
listener:
function
(
stream
:
ClientHttp2Stream
, headers
:
IncomingHttpHeaders
&
IncomingHttpStatusHeader
, flags
:
number
)
:
void
Parameters
stream:
ClientHttp2Stream
headers:
IncomingHttpHeaders
&
IncomingHttpStatusHeader
flags:
number
Returns
void
Returns
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
close
close
(
callback
?:
function
)
:
void
Parameters
Optional
callback:
function
(
)
:
void
Returns
void
Returns
void
destroy
destroy
(
error
?:
Error
, code
?:
number
)
:
void
Parameters
Optional
error:
Error
Optional
code:
number
Returns
void
emit
emit
(
event
:
"altsvc"
, alt
:
string
, origin
:
string
, stream
:
number
)
:
boolean
emit
(
event
:
"origin"
, origins
:
string
[]
)
:
boolean
emit
(
event
:
"connect"
, session
:
ClientHttp2Session
, socket
:
Socket
|
TLSSocket
)
:
boolean
emit
(
event
:
"stream"
, stream
:
ClientHttp2Stream
, headers
:
IncomingHttpHeaders
&
IncomingHttpStatusHeader
, flags
:
number
)
:
boolean
emit
(
event
:
string
|
symbol
,
...
args
:
any
[]
)
:
boolean
Parameters
event:
"altsvc"
alt:
string
origin:
string
stream:
number
Returns
boolean
Parameters
event:
"origin"
origins:
string
[]
Returns
boolean
Parameters
event:
"connect"
session:
ClientHttp2Session
socket:
Socket
|
TLSSocket
Returns
boolean
Parameters
event:
"stream"
stream:
ClientHttp2Stream
headers:
IncomingHttpHeaders
&
IncomingHttpStatusHeader
flags:
number
Returns
boolean
Parameters
event:
string
|
symbol
Rest
...
args:
any
[]
Returns
boolean
event
Names
event
Names
(
)
:
Array
<
string
|
symbol
>
Returns
Array
<
string
|
symbol
>
get
Max
Listeners
get
Max
Listeners
(
)
:
number
Returns
number
goaway
goaway
(
code
?:
number
, lastStreamID
?:
number
, opaqueData
?:
Buffer
|
DataView
|
NodeJS.TypedArray
)
:
void
Parameters
Optional
code:
number
Optional
lastStreamID:
number
Optional
opaqueData:
Buffer
|
DataView
|
NodeJS.TypedArray
Returns
void
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
:
"altsvc"
, listener
:
function
)
:
this
on
(
event
:
"origin"
, listener
:
function
)
:
this
on
(
event
:
"connect"
, listener
:
function
)
:
this
on
(
event
:
"stream"
, listener
:
function
)
:
this
on
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
"altsvc"
listener:
function
(
alt
:
string
, origin
:
string
, stream
:
number
)
:
void
Parameters
alt:
string
origin:
string
stream:
number
Returns
void
Returns
this
Parameters
event:
"origin"
listener:
function
(
origins
:
string
[]
)
:
void
Parameters
origins:
string
[]
Returns
void
Returns
this
Parameters
event:
"connect"
listener:
function
(
session
:
ClientHttp2Session
, socket
:
Socket
|
TLSSocket
)
:
void
Parameters
session:
ClientHttp2Session
socket:
Socket
|
TLSSocket
Returns
void
Returns
this
Parameters
event:
"stream"
listener:
function
(
stream
:
ClientHttp2Stream
, headers
:
IncomingHttpHeaders
&
IncomingHttpStatusHeader
, flags
:
number
)
:
void
Parameters
stream:
ClientHttp2Stream
headers:
IncomingHttpHeaders
&
IncomingHttpStatusHeader
flags:
number
Returns
void
Returns
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
once
once
(
event
:
"altsvc"
, listener
:
function
)
:
this
once
(
event
:
"origin"
, listener
:
function
)
:
this
once
(
event
:
"connect"
, listener
:
function
)
:
this
once
(
event
:
"stream"
, listener
:
function
)
:
this
once
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
"altsvc"
listener:
function
(
alt
:
string
, origin
:
string
, stream
:
number
)
:
void
Parameters
alt:
string
origin:
string
stream:
number
Returns
void
Returns
this
Parameters
event:
"origin"
listener:
function
(
origins
:
string
[]
)
:
void
Parameters
origins:
string
[]
Returns
void
Returns
this
Parameters
event:
"connect"
listener:
function
(
session
:
ClientHttp2Session
, socket
:
Socket
|
TLSSocket
)
:
void
Parameters
session:
ClientHttp2Session
socket:
Socket
|
TLSSocket
Returns
void
Returns
this
Parameters
event:
"stream"
listener:
function
(
stream
:
ClientHttp2Stream
, headers
:
IncomingHttpHeaders
&
IncomingHttpStatusHeader
, flags
:
number
)
:
void
Parameters
stream:
ClientHttp2Stream
headers:
IncomingHttpHeaders
&
IncomingHttpStatusHeader
flags:
number
Returns
void
Returns
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
ping
ping
(
callback
:
function
)
:
boolean
ping
(
payload
:
Buffer
|
DataView
|
NodeJS.TypedArray
, callback
:
function
)
:
boolean
Parameters
callback:
function
(
err
:
Error
|
null
, duration
:
number
, payload
:
Buffer
)
:
void
Parameters
err:
Error
|
null
duration:
number
payload:
Buffer
Returns
void
Returns
boolean
Parameters
payload:
Buffer
|
DataView
|
NodeJS.TypedArray
callback:
function
(
err
:
Error
|
null
, duration
:
number
, payload
:
Buffer
)
:
void
Parameters
err:
Error
|
null
duration:
number
payload:
Buffer
Returns
void
Returns
boolean
prepend
Listener
prepend
Listener
(
event
:
"altsvc"
, listener
:
function
)
:
this
prepend
Listener
(
event
:
"origin"
, listener
:
function
)
:
this
prepend
Listener
(
event
:
"connect"
, listener
:
function
)
:
this
prepend
Listener
(
event
:
"stream"
, listener
:
function
)
:
this
prepend
Listener
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
"altsvc"
listener:
function
(
alt
:
string
, origin
:
string
, stream
:
number
)
:
void
Parameters
alt:
string
origin:
string
stream:
number
Returns
void
Returns
this
Parameters
event:
"origin"
listener:
function
(
origins
:
string
[]
)
:
void
Parameters
origins:
string
[]
Returns
void
Returns
this
Parameters
event:
"connect"
listener:
function
(
session
:
ClientHttp2Session
, socket
:
Socket
|
TLSSocket
)
:
void
Parameters
session:
ClientHttp2Session
socket:
Socket
|
TLSSocket
Returns
void
Returns
this
Parameters
event:
"stream"
listener:
function
(
stream
:
ClientHttp2Stream
, headers
:
IncomingHttpHeaders
&
IncomingHttpStatusHeader
, flags
:
number
)
:
void
Parameters
stream:
ClientHttp2Stream
headers:
IncomingHttpHeaders
&
IncomingHttpStatusHeader
flags:
number
Returns
void
Returns
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
prepend
Once
Listener
prepend
Once
Listener
(
event
:
"altsvc"
, listener
:
function
)
:
this
prepend
Once
Listener
(
event
:
"origin"
, listener
:
function
)
:
this
prepend
Once
Listener
(
event
:
"connect"
, listener
:
function
)
:
this
prepend
Once
Listener
(
event
:
"stream"
, listener
:
function
)
:
this
prepend
Once
Listener
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
"altsvc"
listener:
function
(
alt
:
string
, origin
:
string
, stream
:
number
)
:
void
Parameters
alt:
string
origin:
string
stream:
number
Returns
void
Returns
this
Parameters
event:
"origin"
listener:
function
(
origins
:
string
[]
)
:
void
Parameters
origins:
string
[]
Returns
void
Returns
this
Parameters
event:
"connect"
listener:
function
(
session
:
ClientHttp2Session
, socket
:
Socket
|
TLSSocket
)
:
void
Parameters
session:
ClientHttp2Session
socket:
Socket
|
TLSSocket
Returns
void
Returns
this
Parameters
event:
"stream"
listener:
function
(
stream
:
ClientHttp2Stream
, headers
:
IncomingHttpHeaders
&
IncomingHttpStatusHeader
, flags
:
number
)
:
void
Parameters
stream:
ClientHttp2Stream
headers:
IncomingHttpHeaders
&
IncomingHttpStatusHeader
flags:
number
Returns
void
Returns
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
raw
Listeners
raw
Listeners
(
event
:
string
|
symbol
)
:
Function
[]
Parameters
event:
string
|
symbol
Returns
Function
[]
ref
ref
(
)
:
void
Returns
void
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
request
request
(
headers
?:
OutgoingHttpHeaders
, options
?:
ClientSessionRequestOptions
)
:
ClientHttp2Stream
Parameters
Optional
headers:
OutgoingHttpHeaders
Optional
options:
ClientSessionRequestOptions
Returns
ClientHttp2Stream
set
Max
Listeners
set
Max
Listeners
(
n
:
number
)
:
this
Parameters
n:
number
Returns
this
set
Timeout
set
Timeout
(
msecs
:
number
, callback
?:
function
)
:
void
Parameters
msecs:
number
Optional
callback:
function
(
)
:
void
Returns
void
Returns
void
settings
settings
(
settings
:
Settings
)
:
void
Parameters
settings:
Settings
Returns
void
unref
unref
(
)
:
void
Returns
void
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"
constants
"https"
"net"
"tls"
generate
Self
Signed
Certificate
parse
Cookie
path
ToRegex
session
InMemory
Client
Http2
Session
constructor
alpn
Protocol
closed
connecting
destroyed
encrypted
local
Settings
origin
Set
pending
Settings
Ack
remote
Settings
socket
state
type
default
Max
Listeners
add
Listener
close
destroy
emit
event
Names
get
Max
Listeners
goaway
listener
Count
listeners
off
on
once
ping
prepend
Listener
prepend
Once
Listener
raw
Listeners
ref
remove
All
Listeners
remove
Listener
request
set
Max
Listeners
set
Timeout
settings
unref
listener
Count
Client
Http2
Stream
Http2
Secure
Server
Http2
Server
Http2
Server
Request
Http2
Server
Response
Http2
Session
Http2
Stream
Server
Http2
Session
Server
Http2
Stream
Alternative
Service
Options
Client
Session
Options
Client
Session
Request
Options
Incoming
Http
Headers
Incoming
Http
Status
Header
Secure
Client
Session
Options
Secure
Server
Options
Secure
Server
Session
Options
Server
Options
Server
Session
Options
Server
Stream
File
Response
Options
Server
Stream
File
Response
Options
With
Error
Server
Stream
Response
Options
Session
Options
Session
State
Settings
Stat
Options
Stream
Priority
Options
Stream
State
connect
create
Secure
Server
create
Server
get
Default
Settings
get
Packed
Settings
get
Unpacked
Settings
Generated using
TypeDoc
since v4.0.0