Skip to content

Commit d7d85b1

Browse files
authored
Merge pull request #247 from ricardogobbosouza/patch-2
feat: support for custom connectors
2 parents 1eda59d + 84a76cd commit d7d85b1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/echo.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ export default class Echo {
4444
this.connector = new SocketIoConnector(this.options);
4545
} else if (this.options.broadcaster == 'null') {
4646
this.connector = new NullConnector(this.options);
47+
} else if (typeof this.options.broadcaster == 'function') {
48+
this.connector = new this.options.broadcaster(this.options);
4749
}
4850
}
4951

0 commit comments

Comments
 (0)