feat: F4.6g1 the echo server and the generic client windows

Oracle EchoWindowRun uses Java's echo server and client windows as a
person does; SaveAfterRunRun echo saves what Java keeps after the run.
The room takes setActive with a port, connect/disconnect/send, sends
both views and writes the server's port and the client's target back.
The editor's windows show Java's buttons, fields and lines; a port that
is no port is marked and not handed over (Java's button throws).
Core fix: an empty message (one empty segment with the push, as Java's
erstelleSegmente makes) counted as a repeat and never arrived.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-03 20:04:33 +00:00
co-authored by Claude Opus 5.5
parent 3dc2713f81
commit e31da62ae0
24 changed files with 1481 additions and 18 deletions
+25
View File
@@ -0,0 +1,25 @@
// What the echo server's and the generic client's windows show besides their
// lines, as the room keeps them and every client shows them (plan §7.3),
// after GUIApplicationServerBausteinWindow and
// GUIApplicationClientBausteinWindow (measured with tools/java-oracle's
// EchoWindowRun).
/** The echo server: its button (running or not) and its port, which can be typed into only while it does not run. */
export interface EchoServerView {
readonly active: boolean;
readonly port: number;
}
/** The generic client: "Verbinden" or "Trennen", and the server's address and port, which can be typed into only while it is not connected. */
export interface SimpleClientView {
readonly connected: boolean;
readonly address: string;
readonly port: number;
}
/** A port as Java's windows take it (Integer.parseInt), and as a socket can have it: a whole number from 0 to 65535; undefined for any other text. */
export function portOfText(text: string): number | undefined {
if (!/^\d+$/.test(text)) return undefined;
const port = Number(text);
return port <= 65_535 ? port : undefined;
}
+1
View File
@@ -2,5 +2,6 @@
export * from './host.js';
export * from './sim.js';
export * from './terminal.js';
export * from './echo.js';
export * from './mail.js';
export * from './web.js';
+4 -2
View File
@@ -75,8 +75,10 @@ export type HostMessage =
/**
* What a program's window shows besides its lines (plan §7.3), whole: on
* subscribing and when it changes; null while it has nothing (its program
* does not run, a browser that never ran). The browser's (BrowserView) and
* the web server's (WebServerView) so far.
* does not run, a browser that never ran): the browser's (BrowserView), the
* web server's (WebServerView), the e-mail program's and server's
* (EmailClientView, EmailServerView), the echo server's and the generic
* client's (EchoServerView, SimpleClientView).
*/
| { readonly v: 1; readonly kind: 'view'; readonly node: string; readonly app: AppKind; readonly view: unknown }
/**