modulepackage
0.0.0-20191019012404-ee83f8db1ed7
Repository: https://github.com/cryptopunkscc/go-xmpp.git
Documentation: pkg.go.dev
# README
go-xmpp
This library lets you open a XMPP stream over a TCP connection (or any other io.ReadWriter) and exchange XMPP protocol messages.
This is a work in progress in its early stages, some things still don't work, some might change drastically. Not for use in production environments.
Quick start
tcp, _ := net.Dial("tcp", "server.com:5222")
stream := &xmpp.StreamHeader{
Namespace: xmpp.NamespaceClient,
To: "server.com",
}
conn, err := xmpp.Open(tcp, stream) // Open a bidirectional XMPP stream over the TCP connection (as a client)
conn.Features() // returns *xmpp.Features with stream features
conn.Write(&xmpp.StartTLS{}) // Send a starttls message
conn.Read() // Read an XMPP protocol message from the stream
conn.Close() // Close the XMPP stream
# Functions
No description provided by the author
Connect establishes an XMPP connection.
No description provided by the author
HandleStanza routes a stanza to a typed stanza handler.
Identify returns an XMPP message name and namespace (can be empty).
NewHeader returns a stream header in client protocol namespace.
NewPlainAuthenticator instantiates a PLAIN authenticator using provided credentials.
No description provided by the author
NewStream instantiates a new stream using the provided transport.
Open opens a new session using provided config and routes session events to the provided handler.
ParseStreamHeader decodes the opening of the XML stream without touching the content of the stream.
# Constants
No description provided by the author
No description provided by the author
Stream namespaces.
No description provided by the author
Stream namespaces.
Stream namespaces.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
DefinedConditions is a list of conditions defined by RFC6120.
No description provided by the author
ErrEndOfStream indicates the XMPP stream has ended.
No description provided by the author
ErrStreamError indicates invalid stream data.
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
Broadcast routes XMPP events to mutiple handlers.
No description provided by the author
No description provided by the author
No description provided by the author
Config represents XMPP client configuration.
Conn represents an XMPP connection.
No description provided by the author
Credentials holds authentication information.
No description provided by the author
No description provided by the author
A Generic represents an unknown XML element.
IQ represents an IQ stanza.
No description provided by the author
A Message represents a message stanza.
PlainAuth implements a plain SASL authentication.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
RosterItem represents a roster item.
RosterQuery represents a roster query element.
No description provided by the author
No description provided by the author
No description provided by the author
Stream manages a bidirectional XMPP stream using an underlying transport.
StreamHeader represents stream info exchanged in the initial <stream/> element.
No description provided by the author
No description provided by the author
UniqueID holds the state of a unique id generator.
# Interfaces
Authenticator defines an interface for SASL authentication.
No description provided by the author
No description provided by the author
Handler defines an interface for XMPP event handlers.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Session defines an interface for session.
No description provided by the author
StanzaHandler defines an interface for specific stanza handler.
No description provided by the author
# Type aliases
No description provided by the author
JID is the type used to store JIDs.
No description provided by the author
No description provided by the author