tahamajs/CPS / Files /ComputerAssignments /CA2 /code /docs /PROTOCOL_SPECIFICATION.md
tahamajs's picture
|
download
raw
593 Bytes

docs/PROTOCOL_SPECIFICATION.md

# Network Protocol Specification

This document defines the communication protocol between the Android app and the PC server.

## Transport Layer

- **Protocol:** TCP (ensures order and error‑free delivery)
- **Port:** 8080 (configurable)
- **Encoding:** UTF‑8
- **Message delimiter:** newline (`\n`)

## Message Format (JSON)

All messages are JSON objects terminated by newline.

### 1. Move Message (phone → PC)

Sent continuously as the user moves the phone. Loss is acceptable.

```json
{"type": "move", "dx": 12.3, "dy": -5.2}

Xet Storage Details

Size:
593 Bytes
·
Xet hash:
96c4179454f92ed923fa39eaa906631dd39139061dcd480a77dbb739c364cac7

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.