Input box, sidebar, ws connection
This commit is contained in:
22
ui/site/ws/ConnectionHandler.js
Normal file
22
ui/site/ws/ConnectionHandler.js
Normal file
@@ -0,0 +1,22 @@
|
||||
import Connection from "./Connection.js";
|
||||
|
||||
export default class ConnectionHandler {
|
||||
connection;
|
||||
disabled = true;
|
||||
|
||||
constructor() {
|
||||
this.connection = new Connection();
|
||||
}
|
||||
|
||||
isOpen() {
|
||||
if(this.connection.checkOpen()) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
send(msg) {
|
||||
this.connection.sendMessage(msg)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user