Protocol Overview
Overview of the Portal Transfer Protocol (PXP) application layer design.
PXP — Portal Transfer Protocol
Version: 0.1
Status: Draft Specification
What is PXP?
PXP (Portal Transfer Protocol) is an application-layer protocol for transferring files and directories between devices on a local area network. It requires zero configuration — no accounts, no cloud, no pairing codes.
PXP operates over two transports: UDP for peer discovery, and TCP for data transfer.
Protocol Phases
A PXP transaction consists of four sequential phases:
| Phase | Transport | Spec |
|---|---|---|
| 1. Discovery | UDP | PXP-DISCOVERY |
| 2. Handshake | TCP | PXP-HANDSHAKE |
| 3. Manifest | TCP | PXP-MANIFEST |
| 4. Streaming | TCP | PXP-STREAMING |
Roles
PXP defines exactly two roles per transaction:
- Sender — The peer that initiates a file transfer. It discovers the receiver, opens the TCP connection, and streams the data.
- Receiver — The peer that accepts a file transfer. It advertises itself via UDP beacons and listens for incoming TCP connections.
Design Principles
- Zero configuration. Peers discover each other automatically via multicast and broadcast on the local network.
- Streaming. Data is streamed directly from disk to network. The sender does not need to stage or buffer the entire payload before transmission.
- Single connection. The entire transaction — handshake, manifest, and all file data — flows over a single TCP connection.
- Unidirectional data flow. After the handshake, data flows exclusively from sender to receiver. There are no application-level acknowledgments. (See PXP-STREAMING § Limitations.)
Conventions
The key words "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", and "MAY" in the spec documents are to be interpreted as described in RFC 2119.
All multi-byte integers are encoded in big-endian (network byte order) unless stated otherwise.