Search
Preparing search index...
The search index is not available
@alphahorizonio/unisockets
Options
All
Public
Public/Protected
All
Inherited
Externals
Only exported
Menu
Globals
SignalingServer
Class SignalingServer
Hierarchy
SignalingService
SignalingServer
Index
Constructors
constructor
Properties
aliases
clients
host
logger
port
server
subnets
subnets
Mutex
Methods
claimTCPAddress
close
createIPAddress
createTCPAddress
handle
Accepting
handle
Answer
handle
Bind
handle
Candidate
handle
Connect
handle
Knock
handle
Offer
handle
Operation
handle
Shutdown
open
parseIPAddress
parseTCPAddress
receive
register
Goodbye
removeIPAddress
removeTCPAddress
send
toIPAddress
toTCPAddress
Constructors
constructor
new
Signaling
Server
(
host
:
string
, port
:
number
)
:
SignalingServer
Parameters
host:
string
port:
number
Returns
SignalingServer
Properties
Private
aliases
aliases
:
Map
<
string
,
MAlias
>
= new Map<string, MAlias>()
Private
clients
clients
:
Map
<
string
,
WebSocket
>
= new Map<string, WebSocket>()
Private
host
host
:
string
Protected
logger
logger
:
Logger
= getLogger()
Private
port
port
:
number
Protected
Optional
server
server
:
Server
Private
subnets
subnets
:
Map
<
string
,
Map
<
number
,
MMember
>
>
= new Map<string, Map<number, MMember>>()
Private
subnets
Mutex
subnets
Mutex
:
Mutex
= new Mutex()
Methods
Private
claimTCPAddress
claimTCPAddress
(
tcpAddress
:
string
)
:
Promise
<
void
>
Parameters
tcpAddress:
string
Returns
Promise
<
void
>
close
close
(
)
:
Promise
<
void
>
Returns
Promise
<
void
>
Private
createIPAddress
createIPAddress
(
subnet
:
string
)
:
Promise
<
string
>
Parameters
subnet:
string
Returns
Promise
<
string
>
Private
createTCPAddress
createTCPAddress
(
ipAddress
:
string
)
:
Promise
<
string
>
Parameters
ipAddress:
string
Returns
Promise
<
string
>
Private
handle
Accepting
handle
Accepting
(
data
:
IAcceptingData
)
:
Promise
<
void
>
Parameters
data:
IAcceptingData
Returns
Promise
<
void
>
Private
handle
Answer
handle
Answer
(
data
:
IAnswerData
)
:
Promise
<
void
>
Parameters
data:
IAnswerData
Returns
Promise
<
void
>
Private
handle
Bind
handle
Bind
(
data
:
IBindData
)
:
Promise
<
void
>
Parameters
data:
IBindData
Returns
Promise
<
void
>
Private
handle
Candidate
handle
Candidate
(
data
:
ICandidateData
)
:
Promise
<
void
>
Parameters
data:
ICandidateData
Returns
Promise
<
void
>
Private
handle
Connect
handle
Connect
(
data
:
IConnectData
)
:
Promise
<
void
>
Parameters
data:
IConnectData
Returns
Promise
<
void
>
Private
handle
Knock
handle
Knock
(
data
:
IKnockData
, client
:
WebSocket
)
:
Promise
<
void
>
Parameters
data:
IKnockData
client:
WebSocket
Returns
Promise
<
void
>
Private
handle
Offer
handle
Offer
(
data
:
IOfferData
)
:
Promise
<
void
>
Parameters
data:
IOfferData
Returns
Promise
<
void
>
Private
handle
Operation
handle
Operation
(
operation
:
ISignalingOperation
<
TSignalingData
>
, client
:
WebSocket
)
:
Promise
<
void
>
Parameters
operation:
ISignalingOperation
<
TSignalingData
>
client:
WebSocket
Returns
Promise
<
void
>
Private
handle
Shutdown
handle
Shutdown
(
data
:
IShutdownData
)
:
Promise
<
void
>
Parameters
data:
IShutdownData
Returns
Promise
<
void
>
open
open
(
)
:
Promise
<
void
>
Returns
Promise
<
void
>
Private
parseIPAddress
parseIPAddress
(
ipAddress
:
string
)
:
{
subnet
:
string
;
suffix
:
number
}
Parameters
ipAddress:
string
Returns
{
subnet
:
string
;
suffix
:
number
}
subnet
:
string
suffix
:
number
Private
parseTCPAddress
parseTCPAddress
(
tcpAddress
:
string
)
:
{
ipAddress
:
string
;
port
:
number
}
Parameters
tcpAddress:
string
Returns
{
ipAddress
:
string
;
port
:
number
}
ip
Address
:
string
port
:
number
Protected
receive
receive
(
rawOperation
:
Data
)
:
Promise
<
ISignalingOperation
<
TSignalingData
>
>
Parameters
rawOperation:
Data
Returns
Promise
<
ISignalingOperation
<
TSignalingData
>
>
Private
register
Goodbye
register
Goodbye
(
id
:
string
)
:
Promise
<
void
>
Parameters
id:
string
Returns
Promise
<
void
>
Private
removeIPAddress
removeIPAddress
(
ipAddress
:
string
)
:
Promise
<
void
>
Parameters
ipAddress:
string
Returns
Promise
<
void
>
Private
removeTCPAddress
removeTCPAddress
(
tcpAddress
:
string
)
:
Promise
<
void
>
Parameters
tcpAddress:
string
Returns
Promise
<
void
>
Protected
send
send
(
client
:
WebSocket
|
undefined
, operation
:
ISignalingOperation
<
any
>
)
:
Promise
<
void
>
Parameters
client:
WebSocket
|
undefined
operation:
ISignalingOperation
<
any
>
Returns
Promise
<
void
>
Private
toIPAddress
toIPAddress
(
subnet
:
string
, suffix
:
number
)
:
string
Parameters
subnet:
string
suffix:
number
Returns
string
Private
toTCPAddress
toTCPAddress
(
ipAddress
:
string
, port
:
number
)
:
string
Parameters
ipAddress:
string
port:
number
Returns
string
Globals
Signaling
Server
constructor
aliases
clients
host
logger
port
server
subnets
subnets
Mutex
claimTCPAddress
close
createIPAddress
createTCPAddress
handle
Accepting
handle
Answer
handle
Bind
handle
Candidate
handle
Connect
handle
Knock
handle
Offer
handle
Operation
handle
Shutdown
open
parseIPAddress
parseTCPAddress
receive
register
Goodbye
removeIPAddress
removeTCPAddress
send
toIPAddress
toTCPAddress
Generated using
TypeDoc