*Update dist

This commit is contained in:
Derrick Hammer 2023-02-06 03:50:00 -05:00
parent 1f76aef53a
commit e69e7a67b6
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 3 deletions

6
dist/index.js vendored
View File

@ -54,7 +54,7 @@ export class Socket extends Client {
this.id = id; this.id = id;
} }
on(event, fn, context) { on(event, fn, context) {
const [update, promise] = this.connectModule("listenSocketEvent", { id: this.id, event: event }, (data) => { const [update, promise] = this.connectModule("socketListenEvent", { id: this.id, event: event }, (data) => {
this.emit(event, data); this.emit(event, data);
}); });
this.trackEvent(event, update); this.trackEvent(event, update);
@ -72,12 +72,12 @@ export class Socket extends Client {
return super.off(event, fn, context, once); return super.off(event, fn, context, once);
} }
write(message) { write(message) {
this.callModule("write", { id: this.id, message }); this.callModule("socketWrite", { id: this.id, message });
} }
end() { end() {
this.callModule("socketExists", { id: this.id }).then(([exists]) => { this.callModule("socketExists", { id: this.id }).then(([exists]) => {
if (exists) { if (exists) {
this.callModule("close", { id: this.id }); this.callModule("socketClose", { id: this.id });
} }
}); });
} }