refactor: add debug for client socket.emit events

This commit is contained in:
Bill Church 2022-05-17 15:48:53 -04:00
parent 9c99b0940e
commit 7c9e00cdfe
2 changed files with 4 additions and 1 deletions

File diff suppressed because one or more lines are too long

View file

@ -132,6 +132,7 @@ function toggleLog () { // eslint-disable-line
// replay password to server, requires
function replayCredentials () { // eslint-disable-line
socket.emit('control', 'replayCredentials');
debug(`control: replayCredentials`);
term.focus();
return false;
}
@ -157,6 +158,7 @@ function drawMenu() {
function resizeScreen() {
fitAddon.fit();
socket.emit('resize', { cols: term.cols, rows: term.rows });
debug(`resize: ${JSON.stringify({ cols: term.cols, rows: term.rows })}`);
}
window.addEventListener('resize', resizeScreen, false);
@ -174,6 +176,7 @@ socket.on('data', (data: string | Uint8Array) => {
socket.on('connect', () => {
socket.emit('geometry', term.cols, term.rows);
debug(`geometry: ${term.cols}, ${term.rows}`);
});
socket.on(