This commit is contained in:
syuilo 2023-06-06 09:16:38 +09:00
parent aeb8955ca2
commit 29856a9129
2 changed files with 9 additions and 1 deletions

View file

@ -186,6 +186,14 @@ export default class Stream extends EventEmitter<StreamEvents> {
this.stream.send(JSON.stringify(typeOrPayload));
}
public ping(): void {
this.stream.send('ping');
}
public heartbeat(): void {
this.stream.send('h');
}
/**
* Close this connection
*/