Skip to content

Deduplicate request dispatch logic in pipe and TCP handlers #17

@mark-e-deyoung

Description

@mark-e-deyoung

Problem

handle_client (pipe) and handle_socket_client (TCP) share ~80% of their logic: snapshot capture, LRU eviction, session management, event polling, pin/unpin, and the large if/else-if dispatch chain. Any bug fix to one must be replicated in the other.

Proposed Solution

Extract a shared function that both handlers call, leaving only the transport-specific read/write in each handler.

References

  • Correctness audit item 10
  • daemon/src/server.cpp:51-257
  • daemon/src/tcp_server.cpp:90-343

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions