Skip to content

Commit

Permalink
Merge pull request #11 from mayank-SFIN571/socketio-config
Browse files Browse the repository at this point in the history
chore(socketio): add options for socket client
  • Loading branch information
samarpan-b authored Dec 24, 2020
2 parents 950f619 + 0244cdc commit 42a74b4
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 42a74b4

Please sign in to comment.