17 lines
513 B
TypeScript
17 lines
513 B
TypeScript
import * as msgpack from 'msgpackr';
|
|
import { CollabVMProtocolMessage, CollabVMProtocolMessageType } from '@cvmts/collab-vm-1.2-binary-protocol';
|
|
import { GuacamoleProtocol } from './GuacamoleProtocol.js';
|
|
|
|
import { ScreenRect } from './Protocol';
|
|
|
|
export class BinRectsProtocol extends GuacamoleProtocol {
|
|
sendScreenUpdate(rect: ScreenRect): void {
|
|
let bmsg: CollabVMProtocolMessage = {
|
|
type: CollabVMProtocolMessageType.rect,
|
|
rect: rect
|
|
};
|
|
|
|
this.user?.socket.sendBinary(msgpack.encode(bmsg));
|
|
}
|
|
}
|