ipc.net.ts ×5

Frontier kind: Code frontier

unlabeled · c_b36a34c3968d

2 tests · 10851 LOC · 54 files · introduces 0 tests · 48 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
5 ranges48 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1638 ranges10851 lines · 54 files · Browse complete extent
All tests (intent)
2 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 48 introduced LOC across 5 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/base/parts/ipc/common/ipc.net.ts 48 introduced LOC · 5 ranges

Open complete file

360 public acceptChunk(data: VSBuffer | null): void {
361 if (!data || data.byteLength === 0) {
362 > return; ipc.net.ts
363 > }
364
365 this.lastReadTime = Date.now();
664
665 public flushBuffer(): void {
666 > this._bufferedMessages = []; ipc.net.ts
667 > }
668 }
669
706
707 public toArray(): T[] {
708 > const result: T[] = []; ipc.net.ts
709 > let resultLen = 0;
710 > let it = this._first;
711 > while (it) {
712 > result[resultLen++] = it.data;
713 > it = it.next;
714 > }
715 > return result;
716 > }
717
718 public pop(): void {
951
952 public beginAcceptReconnection(socket: ISocket, initialDataChunk: VSBuffer | null): void {
953 > this._isReconnecting = true; ipc.net.ts
954 >
955 > this._socketDisposables.dispose();
956 > this._socketDisposables = new DisposableStore();
957 > this._onControlMessage.flushBuffer();
958 > this._onSocketClose.flushBuffer();
959 > this._onSocketTimeout.flushBuffer();
960 > this._socket.dispose();
961 >
962 > this._lastReplayRequestTime = 0;
963 > this._lastSocketTimeoutTime = Date.now();
964 >
965 > this._socket = socket;
966 > this._socketWriter = this._socketDisposables.add(new ProtocolWriter(this._socket));
967 > this._socketReader = this._socketDisposables.add(new ProtocolReader(this._socket));
968 > this._socketDisposables.add(this._socketReader.onMessage(msg => this._receiveMessage(msg)));
969 > this._socketDisposables.add(this._socket.onClose(e => this._onSocketClose.fire(e)));
970 >
971 > this._socketReader.acceptChunk(initialDataChunk);
972 > }
973
974 public endAcceptReconnection(): void {
975 > this._isReconnecting = false; ipc.net.ts
976 >
977 > // After a reconnection, let the other party know (again) which messages have been received.
978 > // (perhaps the other party didn't receive a previous ACK)
979 > this._incomingAckId = this._incomingMsgId;
980 > const msg = new ProtocolMessage(ProtocolMessageType.Ack, 0, this._incomingAckId, getEmptyBuffer());
981 > this._socketWriter.write(msg);
982 >
983 > // Send again all unacknowledged messages
984 > const toSend = this._outgoingUnackMsg.toArray();
985 > for (let i = 0, len = toSend.length; i < len; i++) {
986 > this._socketWriter.write(toSend[i]);
987 > }
988 > this._recvAckCheck();
989 > }
990
991 public acceptDisconnect(): void {