This section describes the WebSocket commands that clients can send to the Pomodoro server and the messages that the server sends to clients during a Pomodoro session.
### Message Format
Both client commands (sent to the server) and server messages (sent to the client) use the JSON format. The structure of these messages are described in the sections below.
### Client Commands
Clients communicate with the server by sending JSON-encoded commands. Each command must include a `command` field specifying the action to perform. Here are the available commands:
The Start-Command may contain an optional Pomodoro-Config, which allows you to customize the length of the work session, short break, long break, and the number of sessions. If no configuration is provided, the server will use default values.
Example:
```json
{
command: "start",
config: {
"work": 10, // Length of the work session in seconds
"shortBreak": 5, // Length of the short break in seconds
"longBreak": 10, // Length of the long break in seconds