mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 11:08:51 +01:00
cli: enable server message compression
This is the CLI side of enabling compression of servermsg's sent over the socket. It is feature-detected by the CLI sending protocolVersion=2. If present, the consumer can request compression by passing `compress:true` when setting up the server. In this mode, servermsg's are an inflate/deflate stream. Not a ton of code here, but was lots of fun tweaking to get it right :) Fixes https://github.com/microsoft/vscode/issues/163688
This commit is contained in:
@@ -10,7 +10,13 @@ use lazy_static::lazy_static;
|
||||
use crate::options::Quality;
|
||||
|
||||
pub const CONTROL_PORT: u16 = 31545;
|
||||
pub const PROTOCOL_VERSION: u32 = 1;
|
||||
|
||||
/// Protocol version sent to clients. This can be used to indiciate new or
|
||||
/// changed capabilities that clients may wish to leverage.
|
||||
/// 1 - Initial protocol version
|
||||
/// 2 - Addition of `serve.compressed` property to control whether servermsg's
|
||||
/// are compressed bidirectionally.
|
||||
pub const PROTOCOL_VERSION: u32 = 2;
|
||||
|
||||
pub const VSCODE_CLI_VERSION: Option<&'static str> = option_env!("VSCODE_CLI_VERSION");
|
||||
pub const VSCODE_CLI_AI_KEY: Option<&'static str> = option_env!("VSCODE_CLI_AI_KEY");
|
||||
|
||||
Reference in New Issue
Block a user