mirror repo of https://github.com/littlequartz/clink. a socket programming assignment for Sistem Terdistribusi
- Add serverLineMsg type for future server line handling - On successful orderSubmittedMsg with total: - Derive item name from cached menu and append a formatted “[order] Name ordered N × Item ($Total)” to broadcasts - Keep broadcasts capped at 10 entries - Maintain existing ack handling when no total provided Also add a WIP snapshot (main.go.broken): - Replace broadcastListening flag with waitingForMenu and waitingForOrderResp - On connect, start read loop via readServerLineCmd(reader) - When submitting an order, set waitingForOrderResp and call submitOrderCmd without passing reader - After orderSubmittedMsg (success or error), resume listenForBroadcastsCmd if conn/reader present Note: main.go.broken reflects an in-progress refactor toward a single read loop and explicit waiting states. |
||
|---|---|---|
| .github/workflows | ||
| .gitignore | ||
| AGENTS.md | ||
| build.sh | ||
| go.mod | ||
| go.sum | ||
| main.go | ||
| main.go.broken | ||
| server.go | ||