class

XMPP::Transport

Inherits IO / Reference / Object

A transport presents a classic XMPP byte stream (<stream:stream> in, top-level elements out) over the underlying connection protocol. Session and XMLStreamReader read and write complete logical elements through this single abstraction, so SASL, stream management, and auth are untouched.

Constructors

connect(config : Config) : Transport
Source

Class methods

classify_outbound(data : String) : Symbol

Classifies one outbound write from the session into the logical units the message transports care about.

Source
extract_attribute(xml : String, name : String) : String | Nil
Source

Instance methods

encrypted?

True when TLS is already handled at or below this transport, so the session must not attempt a STARTTLS upgrade.

Source
supports_starttls?

Whether the session must negotiate a STARTTLS upgrade on this transport before authentication. Only a plaintext TCP stream does; WebSocket and BOSH transports have no STARTTLS (their security is fixed at connection time by ws/wss or http/https), so the RFC 7590 anti-stripping attempt must not run against them.

Source
tls_socket

The underlying TLS socket when the transport opened one directly (XEP-0368 direct TLS). Nil for plaintext, STARTTLS-managed, WebSocket, and BOSH transports.

Source

Nested types