How akene-uzezi/tp works
This Go TCP protocol provides a command-line client/server workflow: the client connects, sends a ping, receives a pong, then sends data; the server accepts connections, dispatches decoded message types, and returns pong or acknowledgment responses. The protocol package encodes and validates the binary wire format used by both sides. README capabilities such as versioning, payload limits, and graceful cancellation are represented where documented. Source evidence is limited to the indexed excerpts and README; no separate data-processing behavior is shown.
Main entry points: server.go Connection handler · main.go Mode dispatcher · client.go TCP client · protocol.go Message codec
Components 8
Application entry
- Mode dispatcher
cmd/main.go
TCP endpoints
- TCP client
client/client.go - Listener and handler
cmd/main.go - Connection handler
server/server.go - Data processing
server/server.go
Wire protocol
- Message codec
protocol/protocol.go
Other components
- CLI user
- TCP peer
Connections 10
- CLI user → Mode dispatcher: selects mode
cmd/main.go - Mode dispatcher → TCP client: starts client
cmd/main.go - Mode dispatcher → Listener and handler: starts listener
cmd/main.go - Listener and handler → Connection handler: dispatches connection
cmd/main.go - TCP client → TCP peer: opens TCP
client/client.go - Listener and handler → TCP peer: accepts connections
cmd/main.go - TCP client → Message codec: encodes and decodes
client/client.go - Connection handler → Message codec: decodes and encodes
server/server.go - Connection handler → Data processing: processes data
server/server.go - TCP peer → Connection handler: provides connection