move binprotocol to submodule (server)

This commit is contained in:
Elijah R
2024-06-25 21:24:08 -04:00
parent 3384e47e20
commit a2f450b374
10 changed files with 20 additions and 27 deletions

View File

@@ -16,7 +16,7 @@ import { JPEGEncoder } from './JPEGEncoder.js';
import VM from './VM.js';
import { ReaderModel } from '@maxmind/geoip2-node';
import * as msgpack from 'msgpackr';
import { CollabVMProtocolMessage, CollabVMProtocolMessageType } from './protocol/CollabVMProtocolMessage.js';
import { CollabVMProtocolMessage, CollabVMProtocolMessageType } from '@cvmts/collab-vm-1.2-binary-protocol';
// Instead of strange hacks we can just use nodejs provided
// import.meta properties, which have existed since LTS if not before

View File

@@ -6,7 +6,7 @@ import RateLimiter from './RateLimiter.js';
import { execa, execaCommand, ExecaSyncError } from 'execa';
import { Logger } from '@cvmts/shared';
import NetworkClient from './NetworkClient.js';
import CollabVMCapabilities from './protocol/CollabVMCapabilities.js';
import { CollabVMCapabilities } from '@cvmts/collab-vm-1.2-binary-protocol';
export class User {
socket: NetworkClient;

View File

@@ -1,8 +0,0 @@
export default class CollabVMCapabilities {
// Support for JPEG screen rects in binary msgpack format
bin: boolean;
constructor() {
this.bin = false;
}
}

View File

@@ -1,11 +0,0 @@
import CollabVMRectMessage from "./CollabVMRectMessage.js";
export interface CollabVMProtocolMessage {
type: CollabVMProtocolMessageType;
rect?: CollabVMRectMessage | undefined;
}
export enum CollabVMProtocolMessageType {
// JPEG Dirty Rectangle
rect = 0,
}

View File

@@ -1,5 +0,0 @@
export default interface CollabVMRectMessage {
x: number;
y: number;
data: Uint8Array;
}