A command protocol is an application-level convention that distinguishes commands from ordinary data exchanged between communicating programs. In a chat application, the client sends CONNECT followed by a username before sending regular messages. section 8.6
A simple chat command protocol can:
- Identify a connection request, such as CONNECT followed by a username. section 8.6
- Separate initial connection handling from later message delivery. section 8.6
- Leave room for server responses, such as message-received acknowledgments. section 8.6
Chat connection
The client sends CONNECT MissIslington. The server parses the command and username, registers the client, and then treats subsequent input as chat messages distributed to connected clients. section 8.6
