---
# System prepended metadata

title: Protocol

---

# Protocol

Assuming tcp connection

## Message format
1. Type
2. Text1
3. Text2

## Situations
1. Connecting/Disconnecting
2. Question Delivery
3. Answer Approvement


### Connecting/Disconnecting

#### Connecting

Protocol: 1

Taking into account that the ip address of the teacher's phone is already known (being by bluetooth or qr code).

1. User sends message with __username__ text and __class__ text
2. Server responds with __workshop__ text  and __session__ text</span>

> USER: 1%'USERNAME'-'CLASS'%
> SERVER: 1%'WORKSHOP'%'SESSION'

#### Disconnecting

Protocol: 2

1. All users send a message informing they are disconnecting and the final __score__ integer

> USER: 2%'SCORE'%

### Question Delivery

Protocol: 3

1. Server sends message to next question.

> SERVER: 3%%

### Answer Notification

Protocol: 4%%

1. User sends message to confirm answering and the current __score__ integer 

> USER: 4%'SCORE'%
