flash
cf71bab92d
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.
20 lines
434 B
JavaScript
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);
|