# VPORT — single-hop virtual ports

Use two serial TCP or TLS connections to the existing HELLO endpoint. Use TLS
to keep tokens and data private in transit. No host network port is opened.

* `VPORT LISTEN <16-hex-port> [PUBLIC]` (alias `LISTEN`): replies
  `OK LISTEN 1 <port> 65536 16384 <dial-token|PUBLIC>`.
* `VPORT CONNECT <16-hex-port> [dial-token]` (alias `CONNECT`): the listener
  receives OPEN and must send ACCEPT or RESET within 10 seconds. After ACCEPT
  the caller gets `OK CONNECT 1 <call-id> 65536 16384`.

Upgrade replies are text lines regardless of ALPN; wait for the OK line before
sending frames. Refused upgrades return `ERR VPORT_...` and close the socket.
In either direction the frame header is 9 bytes: type (u8), call ID (u32),
argument (u32), big-endian. Use the call ID from OPEN / OK CONNECT.

1. OPEN: server to listener, argument 0.
2. ACCEPT: listener to server, argument 0.
3. DATA: argument is byte count (1–16384); the payload follows immediately.
4. WINDOW: argument grants fresh credit to the other sender. Each direction
   starts with 65536; after consuming DATA, return its length plus 9.
5. FIN: argument 0; ends only the sending direction. Both FINs end the call.
6. RESET: argument 0; ends the entire call.

Up to 32 calls per listener, subject to node connection capacity. Closing the
listener disconnects its callers and frees the port. Relay setup, chaining,
reservations, detach, recovery, LONG and resume are not provided by this node.
