mirror of
https://github.com/meshcore-dev/meshcore.js.git
synced 2026-04-20 22:13:49 +00:00
use base class methods for disconnected event
This commit is contained in:
parent
c09ad0514c
commit
09ff8771d8
3 changed files with 6 additions and 2 deletions
|
|
@ -9,6 +9,10 @@ class Connection extends EventEmitter {
|
|||
this.emit("connected");
|
||||
}
|
||||
|
||||
onDisconnected() {
|
||||
this.emit("disconnected");
|
||||
}
|
||||
|
||||
async close() {
|
||||
throw new Error("This method must be implemented by the subclass.");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue