refactor: open shortcut
This commit is contained in:
parent
23919573d6
commit
3973b74ff1
|
@ -10,9 +10,12 @@ const decorateServer = compose(
|
|||
|
||||
export class SocketServer extends decorateServer(class {}) {
|
||||
|
||||
constructor() {
|
||||
constructor(httpServer) {
|
||||
super();
|
||||
this.onConnect = this.onConnect.bind(this);
|
||||
if (httpServer) {
|
||||
this.open(httpServer);
|
||||
}
|
||||
}
|
||||
|
||||
close(fn) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user