Unindent overview docs.
This commit is contained in:
parent
8bb5c81347
commit
541db6d37c
|
|
@ -2,11 +2,11 @@
|
||||||
Package for implementing XMPP clients and components.
|
Package for implementing XMPP clients and components.
|
||||||
|
|
||||||
The package is built around 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
|
||||||
the document form the messages processed by either end of the connection.
|
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
|
||||||
client (chat, etc) or component (a sort of server plugin).
|
(chat, etc) or component (a sort of server plugin).
|
||||||
|
|
||||||
Create a client:
|
Create a client:
|
||||||
|
|
||||||
|
|
@ -27,14 +27,14 @@
|
||||||
|
|
||||||
X.Out <- xmpp.Presence{}
|
X.Out <- xmpp.Presence{}
|
||||||
|
|
||||||
Incoming messages are handled by consuming the XMPP instance's In channel.
|
Incoming messages are handled by consuming the XMPP instance's In channel. The
|
||||||
The channel is sent all XMPP stanzas as well as terminating error (io.EOF
|
channel is sent all XMPP stanzas as well as terminating error (io.EOF for clean
|
||||||
for clean shutdown or any other error for something unexpected). The
|
shutdown or any other error for something unexpected). The channel is also
|
||||||
channel is also closed after an error.
|
closed after an error.
|
||||||
|
|
||||||
XMPP defines four types of stanza: <error/>, <iq/>, <message/> and
|
XMPP defines four types of stanza: <error/>, <iq/>, <message/> and <presence/>
|
||||||
<presence/> represented by Error, Iq, Message (shown below) and Presence
|
represented by Error, Iq, Message (shown below) and Presence structs
|
||||||
structs respectively.
|
respectively.
|
||||||
|
|
||||||
for i := range X.In {
|
for i := range X.In {
|
||||||
switch v := i.(type) {
|
switch v := i.(type) {
|
||||||
|
|
@ -47,8 +47,8 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Note: A "bound" JID is negotatiated during XMPP setup and may be different
|
Note: A "bound" JID is negotatiated during XMPP setup and may be different to
|
||||||
to the JID passed to the New(Client|Component)XMPP() call. Always
|
the JID passed to the New(Client|Component)XMPP() call. Always use the XMPP
|
||||||
use the XMPP instance's JID attribute in any stanzas.
|
instance's JID attribute in any stanzas.
|
||||||
*/
|
*/
|
||||||
package xmpp
|
package xmpp
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue