@ohze/sfs2x
Version:
SmartFoxServer 2X HTML5/JavaScript API
20 lines (19 loc) • 516 B
JavaScript
import { SmartFox, SFSEvent } from "@ohze/sfs2x";
class Main {
constructor() {
this.onConnection = (e) => {
console.log("onConnection", e);
};
this.sfs = new SmartFox({
// host: "127.0.0.1",
host: "dev.sandinh.com",
port: 8443,
debug: true,
useSSL: true,
zone: "sfsak"
});
this.sfs.addEventListener(SFSEvent.CONNECTION, this.onConnection);
this.sfs.connect();
}
}
new Main();