Search
Preparing search index...
The search index is not available
Electron Forge
Options
All
Public
Public/Protected
All
Inherited
Menu
Electron Forge
@electron-forge/plugin-vite
InternalOptions
Server
Class Server<T>
Type parameters
T
:
WebSocket
=
WebSocket
Hierarchy
EventEmitter
Server
WebSocket
.
WebSocketServer
Index
Constructors
constructor
Properties
clients
options
path
Methods
add
Listener
address
close
handle
Upgrade
off
on
once
remove
Listener
should
Handle
Constructors
constructor
new
Server
<
T
>
(
options
?:
WebSocket
.
ServerOptions
, callback
?:
(
)
=>
void
)
:
Server
<
T
>
Type parameters
T
:
WebSocket
<
T
>
=
WebSocket
Parameters
Optional
options:
WebSocket
.
ServerOptions
Optional
callback:
(
)
=>
void
(
)
:
void
Returns
void
Returns
Server
<
T
>
Properties
clients
clients
:
Set
<
T
>
options
options
:
WebSocket
.
ServerOptions
path
path
:
string
Methods
add
Listener
add
Listener
(
event
:
"connection"
, cb
:
(
client
:
T
, request
:
IncomingMessage
)
=>
void
)
:
Server
<
T
>
add
Listener
(
event
:
"error"
, cb
:
(
err
:
Error
)
=>
void
)
:
Server
<
T
>
add
Listener
(
event
:
"headers"
, cb
:
(
headers
:
string
[]
, request
:
IncomingMessage
)
=>
void
)
:
Server
<
T
>
add
Listener
(
event
:
"close"
|
"listening"
, cb
:
(
)
=>
void
)
:
Server
<
T
>
add
Listener
(
event
:
string
|
symbol
, listener
:
(
...
args
:
any
[]
)
=>
void
)
:
Server
<
T
>
Parameters
event:
"connection"
cb:
(
client
:
T
, request
:
IncomingMessage
)
=>
void
(
client
:
T
, request
:
IncomingMessage
)
:
void
Parameters
client:
T
request:
IncomingMessage
Returns
void
Returns
Server
<
T
>
Parameters
event:
"error"
cb:
(
err
:
Error
)
=>
void
(
err
:
Error
)
:
void
Parameters
err:
Error
Returns
void
Returns
Server
<
T
>
Parameters
event:
"headers"
cb:
(
headers
:
string
[]
, request
:
IncomingMessage
)
=>
void
(
headers
:
string
[]
, request
:
IncomingMessage
)
:
void
Parameters
headers:
string
[]
request:
IncomingMessage
Returns
void
Returns
Server
<
T
>
Parameters
event:
"close"
|
"listening"
cb:
(
)
=>
void
(
)
:
void
Returns
void
Returns
Server
<
T
>
Parameters
event:
string
|
symbol
listener:
(
...
args
:
any
[]
)
=>
void
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
Server
<
T
>
address
address
(
)
:
string
|
WebSocket
.
AddressInfo
Returns
string
|
WebSocket
.
AddressInfo
close
close
(
cb
?:
(
err
?:
Error
)
=>
void
)
:
void
Parameters
Optional
cb:
(
err
?:
Error
)
=>
void
(
err
?:
Error
)
:
void
Parameters
Optional
err:
Error
Returns
void
Returns
void
handle
Upgrade
handle
Upgrade
(
request
:
IncomingMessage
, socket
:
Duplex
, upgradeHead
:
Buffer
, callback
:
(
client
:
T
, request
:
IncomingMessage
)
=>
void
)
:
void
Parameters
request:
IncomingMessage
socket:
Duplex
upgradeHead:
Buffer
callback:
(
client
:
T
, request
:
IncomingMessage
)
=>
void
(
client
:
T
, request
:
IncomingMessage
)
:
void
Parameters
client:
T
request:
IncomingMessage
Returns
void
Returns
void
off
off
(
event
:
"connection"
, cb
:
(
this
:
Server
<
T
>
, socket
:
T
, request
:
IncomingMessage
)
=>
void
)
:
Server
<
T
>
off
(
event
:
"error"
, cb
:
(
this
:
Server
<
T
>
, error
:
Error
)
=>
void
)
:
Server
<
T
>
off
(
event
:
"headers"
, cb
:
(
this
:
Server
<
T
>
, headers
:
string
[]
, request
:
IncomingMessage
)
=>
void
)
:
Server
<
T
>
off
(
event
:
"close"
|
"listening"
, cb
:
(
this
:
Server
<
T
>
)
=>
void
)
:
Server
<
T
>
off
(
event
:
string
|
symbol
, listener
:
(
this
:
Server
<
T
>
,
...
args
:
any
[]
)
=>
void
)
:
Server
<
T
>
Parameters
event:
"connection"
cb:
(
this
:
Server
<
T
>
, socket
:
T
, request
:
IncomingMessage
)
=>
void
(
this
:
Server
<
T
>
, socket
:
T
, request
:
IncomingMessage
)
:
void
Parameters
this:
Server
<
T
>
socket:
T
request:
IncomingMessage
Returns
void
Returns
Server
<
T
>
Parameters
event:
"error"
cb:
(
this
:
Server
<
T
>
, error
:
Error
)
=>
void
(
this
:
Server
<
T
>
, error
:
Error
)
:
void
Parameters
this:
Server
<
T
>
error:
Error
Returns
void
Returns
Server
<
T
>
Parameters
event:
"headers"
cb:
(
this
:
Server
<
T
>
, headers
:
string
[]
, request
:
IncomingMessage
)
=>
void
(
this
:
Server
<
T
>
, headers
:
string
[]
, request
:
IncomingMessage
)
:
void
Parameters
this:
Server
<
T
>
headers:
string
[]
request:
IncomingMessage
Returns
void
Returns
Server
<
T
>
Parameters
event:
"close"
|
"listening"
cb:
(
this
:
Server
<
T
>
)
=>
void
(
this
:
Server
<
T
>
)
:
void
Parameters
this:
Server
<
T
>
Returns
void
Returns
Server
<
T
>
Parameters
event:
string
|
symbol
listener:
(
this
:
Server
<
T
>
,
...
args
:
any
[]
)
=>
void
(
this
:
Server
<
T
>
,
...
args
:
any
[]
)
:
void
Parameters
this:
Server
<
T
>
Rest
...
args:
any
[]
Returns
void
Returns
Server
<
T
>
on
on
(
event
:
"connection"
, cb
:
(
this
:
Server
<
T
>
, socket
:
T
, request
:
IncomingMessage
)
=>
void
)
:
Server
<
T
>
on
(
event
:
"error"
, cb
:
(
this
:
Server
<
T
>
, error
:
Error
)
=>
void
)
:
Server
<
T
>
on
(
event
:
"headers"
, cb
:
(
this
:
Server
<
T
>
, headers
:
string
[]
, request
:
IncomingMessage
)
=>
void
)
:
Server
<
T
>
on
(
event
:
"close"
|
"listening"
, cb
:
(
this
:
Server
<
T
>
)
=>
void
)
:
Server
<
T
>
on
(
event
:
string
|
symbol
, listener
:
(
this
:
Server
<
T
>
,
...
args
:
any
[]
)
=>
void
)
:
Server
<
T
>
Parameters
event:
"connection"
cb:
(
this
:
Server
<
T
>
, socket
:
T
, request
:
IncomingMessage
)
=>
void
(
this
:
Server
<
T
>
, socket
:
T
, request
:
IncomingMessage
)
:
void
Parameters
this:
Server
<
T
>
socket:
T
request:
IncomingMessage
Returns
void
Returns
Server
<
T
>
Parameters
event:
"error"
cb:
(
this
:
Server
<
T
>
, error
:
Error
)
=>
void
(
this
:
Server
<
T
>
, error
:
Error
)
:
void
Parameters
this:
Server
<
T
>
error:
Error
Returns
void
Returns
Server
<
T
>
Parameters
event:
"headers"
cb:
(
this
:
Server
<
T
>
, headers
:
string
[]
, request
:
IncomingMessage
)
=>
void
(
this
:
Server
<
T
>
, headers
:
string
[]
, request
:
IncomingMessage
)
:
void
Parameters
this:
Server
<
T
>
headers:
string
[]
request:
IncomingMessage
Returns
void
Returns
Server
<
T
>
Parameters
event:
"close"
|
"listening"
cb:
(
this
:
Server
<
T
>
)
=>
void
(
this
:
Server
<
T
>
)
:
void
Parameters
this:
Server
<
T
>
Returns
void
Returns
Server
<
T
>
Parameters
event:
string
|
symbol
listener:
(
this
:
Server
<
T
>
,
...
args
:
any
[]
)
=>
void
(
this
:
Server
<
T
>
,
...
args
:
any
[]
)
:
void
Parameters
this:
Server
<
T
>
Rest
...
args:
any
[]
Returns
void
Returns
Server
<
T
>
once
once
(
event
:
"connection"
, cb
:
(
this
:
Server
<
T
>
, socket
:
T
, request
:
IncomingMessage
)
=>
void
)
:
Server
<
T
>
once
(
event
:
"error"
, cb
:
(
this
:
Server
<
T
>
, error
:
Error
)
=>
void
)
:
Server
<
T
>
once
(
event
:
"headers"
, cb
:
(
this
:
Server
<
T
>
, headers
:
string
[]
, request
:
IncomingMessage
)
=>
void
)
:
Server
<
T
>
once
(
event
:
"close"
|
"listening"
, cb
:
(
this
:
Server
<
T
>
)
=>
void
)
:
Server
<
T
>
once
(
event
:
string
|
symbol
, listener
:
(
this
:
Server
<
T
>
,
...
args
:
any
[]
)
=>
void
)
:
Server
<
T
>
Parameters
event:
"connection"
cb:
(
this
:
Server
<
T
>
, socket
:
T
, request
:
IncomingMessage
)
=>
void
(
this
:
Server
<
T
>
, socket
:
T
, request
:
IncomingMessage
)
:
void
Parameters
this:
Server
<
T
>
socket:
T
request:
IncomingMessage
Returns
void
Returns
Server
<
T
>
Parameters
event:
"error"
cb:
(
this
:
Server
<
T
>
, error
:
Error
)
=>
void
(
this
:
Server
<
T
>
, error
:
Error
)
:
void
Parameters
this:
Server
<
T
>
error:
Error
Returns
void
Returns
Server
<
T
>
Parameters
event:
"headers"
cb:
(
this
:
Server
<
T
>
, headers
:
string
[]
, request
:
IncomingMessage
)
=>
void
(
this
:
Server
<
T
>
, headers
:
string
[]
, request
:
IncomingMessage
)
:
void
Parameters
this:
Server
<
T
>
headers:
string
[]
request:
IncomingMessage
Returns
void
Returns
Server
<
T
>
Parameters
event:
"close"
|
"listening"
cb:
(
this
:
Server
<
T
>
)
=>
void
(
this
:
Server
<
T
>
)
:
void
Parameters
this:
Server
<
T
>
Returns
void
Returns
Server
<
T
>
Parameters
event:
string
|
symbol
listener:
(
this
:
Server
<
T
>
,
...
args
:
any
[]
)
=>
void
(
this
:
Server
<
T
>
,
...
args
:
any
[]
)
:
void
Parameters
this:
Server
<
T
>
Rest
...
args:
any
[]
Returns
void
Returns
Server
<
T
>
remove
Listener
remove
Listener
(
event
:
"connection"
, cb
:
(
client
:
T
)
=>
void
)
:
Server
<
T
>
remove
Listener
(
event
:
"error"
, cb
:
(
err
:
Error
)
=>
void
)
:
Server
<
T
>
remove
Listener
(
event
:
"headers"
, cb
:
(
headers
:
string
[]
, request
:
IncomingMessage
)
=>
void
)
:
Server
<
T
>
remove
Listener
(
event
:
"close"
|
"listening"
, cb
:
(
)
=>
void
)
:
Server
<
T
>
remove
Listener
(
event
:
string
|
symbol
, listener
:
(
...
args
:
any
[]
)
=>
void
)
:
Server
<
T
>
Parameters
event:
"connection"
cb:
(
client
:
T
)
=>
void
(
client
:
T
)
:
void
Parameters
client:
T
Returns
void
Returns
Server
<
T
>
Parameters
event:
"error"
cb:
(
err
:
Error
)
=>
void
(
err
:
Error
)
:
void
Parameters
err:
Error
Returns
void
Returns
Server
<
T
>
Parameters
event:
"headers"
cb:
(
headers
:
string
[]
, request
:
IncomingMessage
)
=>
void
(
headers
:
string
[]
, request
:
IncomingMessage
)
:
void
Parameters
headers:
string
[]
request:
IncomingMessage
Returns
void
Returns
Server
<
T
>
Parameters
event:
"close"
|
"listening"
cb:
(
)
=>
void
(
)
:
void
Returns
void
Returns
Server
<
T
>
Parameters
event:
string
|
symbol
listener:
(
...
args
:
any
[]
)
=>
void
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
Server
<
T
>
should
Handle
should
Handle
(
request
:
IncomingMessage
)
:
boolean
|
Promise
<
boolean
>
Parameters
request:
IncomingMessage
Returns
boolean
|
Promise
<
boolean
>
All Modules
Makers
maker-appx
maker-deb
maker-dmg
maker-flatpak
maker-pkg
maker-rpm
maker-snap
maker-squirrel
maker-wix
maker-zip
Plugins
plugin-auto-unpack-natives
plugin-base
plugin-electronegativity
plugin-fuses
plugin-local-electron
plugin-vite
plugin-webpack
Publishers
publisher-base
publisher-bitbucket
publisher-electron-release-server
publisher-gcs
publisher-github
publisher-nucleus
publisher-s3
publisher-snapcraft
publisher-static
Templates
template-base
template-vite
template-vite-typescript
template-webpack
template-webpack-typescript
Utils & Internal Helpers
core
core-utils
maker-base
shared-types
test-utils
tracer
web-multi-logger