src/vs/base/parts/ipc/node/ipc.net.ts/WebSocketNodeSocket/constructor
class WebSocketNodeSocket:	constructor(socket: NodeSocket, permessageDeflate: boolean, inflateBytes: VSBuffer | null, recordInflateBytes: boolean) {
		super();
		this.socket = socket;
		this._totalIncomingWireBytes = 0;
		this._totalIncomingDataBytes = 0;
		this._totalOutgoingWireBytes = 0;
		this._totalOutgoingDataBytes = 0;
		this.permessageDeflate = permessageDeflate;
		this._recordInflateBytes = recordInflateBytes;
		if (permessageDeflate) {
			// See https://tools.ietf.org/html/rfc7692#page-16
			// To simplify our logic, we don't negociate the window size
			// and simply dedicate (2^15) / 32kb per web socket
			this._zlibInflate = zlib.createInflateRaw({
				windowBits: 15
			});
			this._zlibInflate.on('error', (err) => {
				// zlib errors are fatal, since we have no idea how to recover
				console.error(err);
				onUnexpectedError(err);
				this._onClose.fire({
					type: SocketCloseEventType.NodeSocketCloseEvent,
					hadError: true,
					error: err
				});
			});
			this._zlibInflate.on('data', (data: Buffer) => {
				this._pendingInflateData.push(data);
			});
			if (inflateBytes) {
				this._zlibInflate.write(inflateBytes.buffer);
				this._zlibInflate.flush(() => {
					this._pendingInflateData.length = 0;
				});
			}

			this._zlibDeflate = zlib.createDeflateRaw({
				windowBits: 15
			});
			this._zlibDeflate.on('error', (err) => {
				// zlib errors are fatal, since we have no idea how to recover
				console.error(err);
				onUnexpectedError(err);
				this._onClose.fire({
					type: SocketCloseEventType.NodeSocketCloseEvent,
					hadError: true,
					error: err
				});
			});
			this._zlibDeflate.on('data', (data: Buffer) => {
				this._pendingDeflateData.push(data);
			});
		} else {
			this._zlibInflate = null;
			this._zlibDeflate = null;
		}
		this._zlibDeflateFlushWaitingCount = 0;
		this._incomingData = new ChunkStream();
		this._register(this.socket.onData(data => this._acceptChunk(data)));
		this._register(this.socket.onClose((e) => this._onClose.fire(e)));
	}