mirror of
https://gitlab.com/comunic/nodejs-webrtcsignalexchangerserver
synced 2024-11-23 22:09:27 +00:00
Can close connection to signaling server
This commit is contained in:
parent
a98b7e5407
commit
b12a28c4d0
@ -128,6 +128,14 @@ class SignalExchangerClient {
|
||||
return this.socket.readyState == WebSocket.OPEN;
|
||||
}
|
||||
|
||||
/**
|
||||
* Close the connection to the server (if connected)
|
||||
*/
|
||||
close() {
|
||||
if(this.isConnected())
|
||||
this.socket.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Method called once the client is successfully
|
||||
* connected to the client
|
||||
|
@ -128,6 +128,14 @@ class SignalExchangerClient {
|
||||
return this.socket.readyState == WebSocket.OPEN;
|
||||
}
|
||||
|
||||
/**
|
||||
* Close the connection to the server (if connected)
|
||||
*/
|
||||
close() {
|
||||
if(this.isConnected())
|
||||
this.socket.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Method called once the client is successfully
|
||||
* connected to the client
|
||||
|
Loading…
Reference in New Issue
Block a user