22 lines
399 B
JavaScript
22 lines
399 B
JavaScript
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)
|
|
}
|
|
} |