Skip to main content

Module close

Module close 

Source
Expand description

The close codes the relay sends, and the only close codes in this system that mean anything.

Every WebSocket failure the platform produces is 1006 with no reason string (measured), so a caller cannot learn anything from a close it did not originate. These are drawn from RFC 6455’s 4000–4999 private range precisely so they cannot be confused with one.

Constants§

BAD_PORT
?port=0, which cannot be dialled.
IDENTITY_REFUSED
The Noise handshake or session confirmation failed.
NORMAL
Normal completion: one side finished and the relay drained. The tunnel worked.
NO_IDENTITY
?identity=1 against a VM launched without an identity seed.
NO_LISTENER
The guest port refused the connection, or did not accept in time. Nothing is listening — the credential and the scope were fine.
RELAY_FAILED
A read on an established guest connection failed mid-relay.

Functions§

explanation
A human-readable explanation for a close code this relay may have sent.