Skip to content

MXP negotiation parity: C, Kotlin, and Swift client - #10

Merged
powerje merged 1 commit into
trunkfrom
mxp-parity
Jun 29, 2026
Merged

MXP negotiation parity: C, Kotlin, and Swift client#10
powerje merged 1 commit into
trunkfrom
mxp-parity

Conversation

@powerje

@powerje powerje commented Jun 29, 2026

Copy link
Copy Markdown
Member

The Swift server gained MXP negotiation (option 91) earlier; this adds it to the rest.

Implementation Change
C (cmth) COMM_FLAG_MXP (BV09); telnet_table[91]ANNOUNCE_WILL; process_do_mxp (set flag, emit ESC[7z locked default) + process_dont_mxp, wired into negotiation_table
Kotlin server (mth-core/server) CommFlags.MXP (1 shl 8); table[91] → AnnounceFlags.WILL; processDoMxp/processDontMxp + dispatch; mxpEnabled / reassertMXP()
Kotlin client (mth-core/client) responds to WILL MXP with DO MXP; mxpEnabled
Swift client (SwiftMTHClient) responds to WILL MXP with DO MXP; mxpEnabled

Server side announces WILL MXP, handles the client's DO/DONT, and on enable emits ESC[7z (Lock Locked) so normal output is never parsed as markup — matching the Swift server. Client side accepts the server's WILL with DO and tracks the flag (tag rendering remains the client app's job).

Tests

  • Swift client: mxpWillIsAcceptedWithDo (feeding WILL MXP sets mxpEnabled + writes DO MXP).
  • Kotlin server: announce WILL MXP, DO→enabled+ESC[7z, DONT→disabled.
  • Kotlin client: WILL MXPDO MXP+enabled.
  • Swift swift test (155) and Kotlin :mth-core:test both green; C compiles via swift build.

@powerje
powerje merged commit 1e54272 into trunk Jun 29, 2026
5 checks passed
@powerje
powerje deleted the mxp-parity branch June 29, 2026 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant