component

package
v0.21.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2022 License: BSD-2-Clause Imports: 9 Imported by: 1

Documentation

Overview

Package component is used to establish XEP-0114: Jabber Component Protocol connections.

Index

Constants

View Source
const (
	NSAccept = `jabber:component:accept`
)

A list of namespaces used by this package, provided as a convenience.

Variables

This section is empty.

Functions

func Negotiator

func Negotiator(addr jid.JID, secret []byte, recv bool) xmpp.Negotiator

Negotiator returns a new function that can be used to negotiate a component protocol connection when passed to xmpp.NewSession.

It currently only supports the client side of the component protocol. If recv is true (indicating that we are receiving a connection on the server side) the returned xmpp.Negotiator will panic.

func NewSession

func NewSession(ctx context.Context, addr jid.JID, secret []byte, rw io.ReadWriter) (*xmpp.Session, error)

NewSession initiates an XMPP session on the given io.ReadWriter using the component protocol from the perspective of the component.

func ReceiveSession added in v0.18.0

func ReceiveSession(ctx context.Context, addr jid.JID, secret []byte, rw io.ReadWriter) (*xmpp.Session, error)

ReceiveSession initiates an XMPP session on the given io.ReadWriter using the component protocol from the perspective of the server.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL