forked from chteufleur/go-xmpp
Documentation tweaks and additions.
This commit is contained in:
parent
20c380ebc6
commit
6dfd9e096b
|
|
@ -6,11 +6,13 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
// Standard port for XMPP clients to connect to.
|
||||||
XMPP_CLIENT_PORT = 5222
|
XMPP_CLIENT_PORT = 5222
|
||||||
)
|
)
|
||||||
|
|
||||||
// Perform a DNS SRV lookup and return an ordered list of "host:port" TCP
|
// Perform a DNS SRV lookup and return an ordered list of "host:port" TCP
|
||||||
// addresses for the JID's home server.
|
// addresses for the JID's home server. If no SRV records are found then assume
|
||||||
|
// the JID's domain is also the home server.
|
||||||
func HomeServerAddrs(jid JID) (addr []string, err error) {
|
func HomeServerAddrs(jid JID) (addr []string, err error) {
|
||||||
|
|
||||||
// DNS lookup.
|
// DNS lookup.
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
/*
|
/*
|
||||||
Tools for implementing XMPP clients and components.
|
Package for implementing XMPP clients and components.
|
||||||
|
|
||||||
The package is built on the concept of an XML stream - a pair of XML
|
The package is built around the concept of an XML stream - a pair of XML
|
||||||
documents written to and read from a TCP connection. Top-level elements in
|
documents written to and read from a TCP connection. Top-level elements in
|
||||||
the document form the messages processed by either end of the connection.
|
the document form the messages processed by either end of the connection.
|
||||||
|
|
||||||
An XML stream is then configured for an XMPP conversation, as either a
|
An XML stream is then configured for an XMPP conversation, as either a
|
||||||
client (chat, etc client) or component (a sort of server plugin).
|
client (chat, etc) or component (a sort of server plugin).
|
||||||
|
|
||||||
Create a client:
|
Create a client:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Handles XMPP conversations over a Stream. Use NewClientXMPP and/or
|
// Handles XMPP conversations over a Stream. Use NewClientXMPP or
|
||||||
// NewComponentXMPP to create and configuring a XMPP instance.
|
// NewComponentXMPP to create and configure a XMPP instance.
|
||||||
type XMPP struct {
|
type XMPP struct {
|
||||||
// JID associated with the stream. Note: this may be negotiated with the
|
// JID associated with the stream. Note: this may be negotiated with the
|
||||||
// server during setup and so must be used for all messages.
|
// server during setup and so must be used for all messages.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue