Skip to content

Commit c4cbd4b

Browse files
feat: add a serverSideEmit empty function
This function will be overriden in the Redis adapter, for inter-server communication.
1 parent 5579d40 commit c4cbd4b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/index.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,4 +261,14 @@ export class Adapter extends EventEmitter {
261261
}
262262
return exceptSids;
263263
}
264+
265+
/**
266+
* Send a packet to the other Socket.IO servers in the cluster
267+
* @param packet - an array of arguments, which may include an acknowledgement callback at the end
268+
*/
269+
public serverSideEmit(packet: any[]): void {
270+
throw new Error(
271+
"this adapter does not support the serverSideEmit() functionality"
272+
);
273+
}
264274
}

0 commit comments

Comments
 (0)