Skip to content

Commit

Permalink
feat: add a serverSideEmit empty function
Browse files Browse the repository at this point in the history
This function will be overriden in the Redis adapter, for inter-server
communication.
  • Loading branch information
darrachequesne committed May 10, 2021
1 parent 5579d40 commit c4cbd4b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,4 +261,14 @@ export class Adapter extends EventEmitter {
}
return exceptSids;
}

/**
* Send a packet to the other Socket.IO servers in the cluster
* @param packet - an array of arguments, which may include an acknowledgement callback at the end
*/
public serverSideEmit(packet: any[]): void {
throw new Error(
"this adapter does not support the serverSideEmit() functionality"
);
}
}

0 comments on commit c4cbd4b

Please sign in to comment.