FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
adminforth/adminforth/servers/common.ts at main · devforth/adminforth · GitHub
devforth
adminforth
Repository navigation
Code
Issues
16
(16)
Pull requests
4
(4)
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
adminforth
/
adminforth
/
servers
/
common.ts
Copy path
More file actions
More file actions
Latest commit
History
History
History
32 lines (26 loc) · 887 Bytes
Breadcrumbs
adminforth
/
adminforth
/
servers
/
common.ts
Copy path
File metadata and controls
32 lines (26 loc) · 887 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import
{
AdminUserAuthorizationResult
,
IWebSocketClient
}
from
"../types/Back.js"
;
import
{
AdminUser
}
from
"../types/Common.js"
;
export
class
WebSocketClient
implements
IWebSocketClient
{
id
:
string
;
clientId
?:
string
;
lastPing
:
number
;
topics
:
Set
<
string
>
;
adminUser
:
AdminUser
;
authorize
:
(
)
=>
Promise
<
AdminUserAuthorizationResult
>
;
send
:
(
message
:
string
)
=>
void
;
close
:
(
)
=>
void
;
onMessage
:
(
handler
:
(
message
:
string
)
=>
void
)
=>
void
;
onClose
:
(
handler
:
(
)
=>
void
)
=>
void
;
constructor
(
{
id
,
clientId
,
authorize
,
send
,
close
,
onMessage
,
onClose
,
adminUser
}
)
{
this
.
id
=
id
;
this
.
clientId
=
clientId
;
this
.
authorize
=
authorize
;
this
.
send
=
send
;
this
.
close
=
close
;
this
.
onMessage
=
onMessage
;
this
.
onClose
=
onClose
;
this
.
lastPing
=
Date
.
now
(
)
;
this
.
topics
=
new
Set
(
)
;
this
.
adminUser
=
adminUser
;
}
}
Back
|
FazBrowse Home
|
New Git URL