Port PlayerConnection to EventMachine connection handler #90

Open
opened 2026-03-15 04:13:07 +00:00 by freemo · 0 comments
Owner

Metadata

  • Commit Message: feat(server): port PlayerConnection to EventMachine
  • Branch: feature/m1-eventmachine-migration

Background and Context

PlayerConnection currently manages raw TCP sockets with manual read buffering.
With EventMachine, connections are modeled as EventMachine::Connection subclasses
that receive receive_data, post_init, and unbind callbacks.

Expected Behavior

  • PlayerConnection includes or wraps EventMachine::Connection
  • post_init handles connection setup and telnet negotiation
  • receive_data(data) replaces manual socket reading
  • unbind handles disconnection cleanup
  • Output uses send_data instead of direct socket writes

Acceptance Criteria

  • PlayerConnection uses EM connection callbacks
  • Telnet negotiation works via post_init
  • Input buffering works via receive_data
  • Disconnection cleanup works via unbind
  • All communication tests pass

Subtasks

  • Refactor PlayerConnection to use EM::Connection callbacks
  • Port telnet negotiation to post_init
  • Port input handling to receive_data
  • Port disconnection to unbind
  • Port output to send_data
  • Run tests, fix regressions

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the
    Commit Message in Metadata exactly.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata.
  • The commit is submitted as a pull request to master, reviewed, and merged.
## Metadata - **Commit Message**: `feat(server): port PlayerConnection to EventMachine` - **Branch**: `feature/m1-eventmachine-migration` ## Background and Context `PlayerConnection` currently manages raw TCP sockets with manual read buffering. With EventMachine, connections are modeled as `EventMachine::Connection` subclasses that receive `receive_data`, `post_init`, and `unbind` callbacks. ## Expected Behavior - `PlayerConnection` includes or wraps `EventMachine::Connection` - `post_init` handles connection setup and telnet negotiation - `receive_data(data)` replaces manual socket reading - `unbind` handles disconnection cleanup - Output uses `send_data` instead of direct socket writes ## Acceptance Criteria - PlayerConnection uses EM connection callbacks - Telnet negotiation works via `post_init` - Input buffering works via `receive_data` - Disconnection cleanup works via `unbind` - All communication tests pass ## Subtasks - [ ] Refactor PlayerConnection to use EM::Connection callbacks - [ ] Port telnet negotiation to `post_init` - [ ] Port input handling to `receive_data` - [ ] Port disconnection to `unbind` - [ ] Port output to `send_data` - [ ] Run tests, fix regressions ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged**.
freemo added this to the v1.3.0 milestone 2026-03-15 04:13:07 +00:00
freemo self-assigned this 2026-03-15 04:25:23 +00:00
freemo modified the milestone from v1.3.0 to v1.0.0 2026-03-16 00:27:59 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference: aethyr/Aethyr#90
No description provided.