1
Set up basic TCP server
Build Redis from scratch
2 hours
Level 1 of 4
Create a TCP server that accepts connections and responds to PING commands
Objectives
Complete these objectives to finish this level
- Accept TCP connections on port 6379
- Handle PING command and respond with PONG
- Parse Redis protocol (RESP)
Test Cases
Your implementation should pass these tests
- Server accepts connections
- PING returns PONG
- Multiple clients can connect
Hints
- 💡 Use std::net::TcpListener for the server
- 💡 Redis uses RESP (Redis Serialization Protocol)
- 💡 PING command should return +PONG\r\n
Challenge Progress
Level 1 of 425%