The Connection that owns this transport.
The wrapper element name whose children Connection unwraps before
dispatch. BOSH overloads it as a boolean toggle, hence the union.
Abort any in-flight requests (a no-op for the streaming transports).
Open the transport. The wait/hold/route arguments are meaningful
only to BOSH; the streaming transports ignore them.
Optionalwait: numberOptionalhold: numberOptionalroute: stringInspect the opening stream/body and optionally return a status.
Send an optional final stanza and begin closing the stream.
Optionalpres: Element | BuilderTear the transport down without any further stream traffic.
Whether the outgoing queue is empty.
Handle a stream that offered no usable authentication mechanism.
Optionalcallback: () => voidHandle a non-graceful disconnect timeout.
Serialize and write any queued stanzas.
Reset all transport state (see Connection.reset).
Flush the send queue.
Restart the stream (a no-op where the concept does not apply).
The contract every transport (BOSH, WebSocket, the shared-worker WebSocket, the XEP-0114 component transport, and any transport registered via Connection.addProtocol) must fulfil for Connection to drive it.
These members carry a leading underscore for historical reasons: the codebase predates
#private fields and marks internals with_. Despite the naming they are not private, they are the cross-class API thatConnectioninvokes onthis._proto. Transport-specific extras (BOSH's_attach/_restore, the worker's Stream Management callbacks, and so on) are deliberately kept off this interface;Connectionreaches those throughinstanceofnarrowing.