Skip to content

Commit

Permalink
Reimplement Reference Items / Query Interval using the new approach.
Browse files Browse the repository at this point in the history
  • Loading branch information
whitequark committed Oct 8, 2024
1 parent 906d33f commit 324949c
Show file tree
Hide file tree
Showing 9 changed files with 305 additions and 251 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"${workspaceFolder}/test"
"${workspaceFolder}/example"
],
"outFiles": [
"${workspaceFolder}/out/**/*.js"
Expand Down
190 changes: 0 additions & 190 deletions src/connection.ts

This file was deleted.

12 changes: 6 additions & 6 deletions src/cxxrtl/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,23 @@ export class Connection {
private traceSend(packet: proto.ClientPacket) {
this.timestamps.push(new Date());
if (packet.type === 'greeting') {
console.debug(`C>S`, packet);
console.debug(`[CXXRTL] C>S`, packet);
} else if (packet.type === 'command') {
console.debug(`C>S#${this.sendIndex++}`, packet);
console.debug(`[CXXRTL] C>S#${this.sendIndex++}`, packet);
}
}

private traceRecv(packet: proto.ServerPacket) {
if (packet.type === 'greeting') {
console.debug(`S>C`, packet);
console.debug(`[CXXRTL] S>C`, packet);
} else if (packet.type === 'response') {
const elapsed = new Date().getTime() - this.timestamps.shift()!.getTime();
console.debug(`S>C#${this.recvIndex++}`, packet, `(${elapsed}ms)`);
console.debug(`[CXXRTL] S>C#${this.recvIndex++}`, packet, `(${elapsed}ms)`);
} else if (packet.type === 'error') {
this.timestamps.shift();
console.error(`S>C#${this.recvIndex++}`, packet);
console.error(`[CXXRTL] S>C#${this.recvIndex++}`, packet);
} else if (packet.type === 'event') {
console.debug(`S>C`, packet);
console.debug(`[CXXRTL] S>C`, packet);
}
}

Expand Down
Loading

0 comments on commit 324949c

Please sign in to comment.