Documentation ¶
Overview ¶
Package mux implements an XMPP multiplexer.
Be advised: This package is experimental and likely to change or be removed entirely.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(m *ServeMux)
Option configures a ServeMux.
type ServeMux ¶
type ServeMux struct {
// contains filtered or unexported fields
}
ServeMux is an XMPP stream multiplexer. It matches the start element token of each top level stream element against a list of registered patterns and calls the handler for the pattern that most closely matches the token.
Patterns are XML names. If either the namespace or the localname is left off, any namespace or localname will be matched. Full XML names take precedence, followed by wildcard namespaces, followed by wildcard localnames.
func (*ServeMux) HandleXMPP ¶
func (m *ServeMux) HandleXMPP(t xmlstream.TokenReadWriter, start *xml.StartElement) error
HandleXMPP dispatches the request to the handler whose pattern most closely matches start.Name.