Skip to content

Commit

Permalink
chore(socketio): add options for socket client
Browse files Browse the repository at this point in the history
  • Loading branch information
mayank-SFIN571 committed Dec 24, 2020
1 parent 950f619 commit 0244cdc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/providers/push/socketio/socketio.provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class SocketIOProvider implements Provider<SocketNotification> {
private readonly socketConfig?: SocketConfig,
) {
if (this.socketConfig && this.socketConfig.url) {
this.socketService = io(this.socketConfig.url);
this.socketService = io(this.socketConfig.url, socketConfig?.options);
} else {
throw new HttpErrors.PreconditionFailed('Socket Config missing !');
}
Expand Down
6 changes: 6 additions & 0 deletions src/providers/push/socketio/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,10 @@ export interface SocketConfig {
* Path represents the default socket server endpoint
*/
defaultPath: string;
options: {
// sonarignore:start
// eslint-disable-next-line @typescript-eslint/no-explicit-any
[key: string]: any;
// sonarignore:end
};
}

0 comments on commit 0244cdc

Please sign in to comment.