mami/src/proto.js/main.js
flash cf71bab92d Rewrote connection handling.
This has been in the works for over a month and might break things because it's a very radical change.
If it causes you to be unable to join chat, report it on the forum or try joining using the legacy chat on https://sockchat.flashii.net.
2024-04-17 15:42:50 +00:00

20 lines
434 B
JavaScript

#include skel.js
#include sockchat/proto.js
const skel = new WorkerSkeleton;
skel.defineMethod('create', (name, options) => {
if(typeof name !== 'string')
throw 'name must be a string';
let proto, prefix;
if(name === 'sockchat')
proto = new SockChatProtocol(
skel.createDispatcher(prefix = 'sockchat'),
options
);
return skel.defineObject(proto, prefix);
}, true);