diff --git a/src/echo.ts b/src/echo.ts index c02ec503..e254ee17 100644 --- a/src/echo.ts +++ b/src/echo.ts @@ -41,6 +41,8 @@ export default class Echo { this.connector = new SocketIoConnector(this.options); } else if (this.options.broadcaster == 'null') { this.connector = new NullConnector(this.options); + } else if (typeof this.options.broadcaster == 'function') { + this.connector = new this.options.broadcaster(this.options); } }