Archived
1
0

Support permessage-deflate web socket extension (#2846)

This commit is contained in:
Asher
2021-03-10 13:14:24 -06:00
committed by GitHub
parent f70a73bb89
commit 5a1f62a8fb
2 changed files with 16 additions and 11 deletions

View File

@ -120,7 +120,7 @@ export class Vscode {
};
}
public async handleWebSocket(socket: net.Socket, query: Query, _permessageDeflate: boolean): Promise<true> {
public async handleWebSocket(socket: net.Socket, query: Query, permessageDeflate: boolean): Promise<true> {
if (!query.reconnectionToken) {
throw new Error('Reconnection token is missing from query parameters');
}
@ -128,7 +128,8 @@ export class Vscode {
reconnectionToken: <string>query.reconnectionToken,
reconnection: query.reconnection === 'true',
skipWebSocketFrames: query.skipWebSocketFrames === 'true',
// TODO: permessageDeflate,
permessageDeflate,
recordInflateBytes: permessageDeflate,
});
try {
await this.connect(await protocol.handshake(), protocol);