Files
alknet/tasks/transport/tcp-transport.md
glm-5.1 596c89ce24 refactor!: rebrand wraith to alknet
Rename all crates, CLI commands, constants, type names, doc comments,
and documentation from wraith to alknet. Includes wire-protocol changes:
ALPN wraith-ssh -> alknet-ssh, reserved destination prefix wraith- ->
alknet-, SSH auth username wraith -> alknet.
2026-06-05 10:04:32 +00:00

1.6 KiB

id, name, status, depends_on, scope, risk, impact, level
id name status depends_on scope risk impact level
transport/tcp-transport Implement TcpTransport and TcpAcceptor pending
transport/trait-and-types
narrow low component implementation

Description

Implement the simplest transport: plain TCP. TcpTransport connects via TcpStream::connect(addr) on the client side. TcpAcceptor accepts via TcpListener::accept() on the server side. This is the baseline transport that all others build upon conceptually.

Acceptance Criteria

  • crates/alknet-core/src/transport/tcp.rs exports TcpTransport and TcpAcceptor
  • TcpTransport holds a SocketAddr target address
  • TcpTransport::connect() calls TcpStream::connect(addr) and returns the stream
  • TcpTransport::describe() returns e.g. "tcp://1.2.3.4:22"
  • TcpAcceptor holds a TcpListener and accept address
  • TcpAcceptor::accept() calls listener.accept(), returns (stream, TransportInfo) with remote_addr set and TransportKind::Tcp
  • TcpAcceptor constructor binds the listener: TcpAcceptor::bind(addr) async factory
  • Connection timeout handling (tokio default connect timeout is reasonable; document behavior)
  • Unit tests: connect creates a stream, accept receives a connection, describe format
  • Integration test: client connects to server via TCP, stream is duplex

References

  • docs/architecture/transport.md — TcpTransport row in implementations table
  • docs/architecture/overview.md — "TCP on port 22 for basic use"

Notes

To be filled by implementation agent

Summary

To be filled on completion