Commit Graph

133 Commits

Author SHA1 Message Date
Matt Goodall 3be7cf7b0b Implement server-gererated resource binding. 2012-07-09 02:16:25 +01:00
Matt Goodall 2ab32b0959 Experimental XMPP filter-based API, including <iq/> send/recv helper.
The filter mechanism allows you to route any matching stanza to a custom
channel. The SendRecv(iq) method uses a once-only filter to watch for
a reply.
2012-07-09 02:08:01 +01:00
Matt Goodall ec1eaf94b9 More useful docs for Stream and XMPP. 2012-07-09 00:37:21 +01:00
Matt Goodall 6416a5e1ee Resource binding bugs, so I don't forget. 2012-07-09 00:37:21 +01:00
Matt Goodall c9c8526476 Separate stream creation from XMPP use (client, component, etc).
The address of the server is not necessarily related to the JID, e.g.
DNS SRV lookups, manual configuration, etc. Splitting them up means
there's more control and flexibility over how things are put together.

We can always add convenience funcs later, e.g. something like
DialClient(jid, password), to handle the common case.
2012-07-08 23:33:37 +01:00
Matt Goodall 381c04b8b3 Pad out the standard XMPP stanzas a bit so they're at least useful. 2012-07-08 23:20:15 +01:00
Matt Goodall 5399179d50 Represented SASL message and TLS handshake value as chardata. 2012-07-08 23:01:08 +01:00
Matt Goodall 01cff4b3ba Actually use TLS config passed to method. 2012-07-08 22:52:38 +01:00
Matt Goodall f1c999d623 Move the XMPP-specific part of TLS out of the XML stream. 2012-07-08 22:50:10 +01:00
Matt Goodall 0a11fbb155 Remove debug log. 2012-07-08 22:41:34 +01:00
Matt Goodall b9e29ca2b3 Make the stream's API more explicit, add some docs, improved var names. 2012-07-08 22:40:31 +01:00
Matt Goodall ce72493a2f Implement client resource binding. 2012-07-08 12:18:51 +01:00
Matt Goodall 23aeb1fd68 Associate a JID with an XMPP instance.
Client connections negotiate a bound resource JID with the server. The
bound JID may be different from the one requested or even generated by
the server.

Component connections do not negotiate the bound JID but still have a
specific JID associated with the stream.
2012-07-08 12:18:51 +01:00
Matt Goodall 1836b6bf2d Add primary XMPP API. 2012-07-08 12:18:51 +01:00
Matt Goodall c13edc39c2 <message/> and <presence/> stanza shells. 2012-07-08 12:12:14 +01:00
Matt Goodall 300074fb07 <iq/> stanza with generic payload and decode/encode. 2012-07-08 10:13:02 +01:00
Matt Goodall 3eb1c9f722 Allow []byte, string or anything xml.Marshal'able to be sent. 2012-07-06 16:24:32 +01:00
Matt Goodall 8dcfd43ca7 Docs for things I'm mostly happy with. 2012-07-06 14:33:28 +01:00
Matt Goodall 678b9c48a1 Make Stream public again, so we actually get some documentation for it. 2012-07-06 14:29:15 +01:00
Matt Goodall 72dc222360 Make the stream struct private. Rename factory func. 2012-07-06 11:47:15 +01:00
Matt Goodall b879d2cfef Add bug about UpgradeTLS doing XMPP-specific stuff. 2012-07-06 11:47:15 +01:00
Matt Goodall 627364727e The client and component connections are really just streams too.
Only difference is how they're setup. After that, it's the common iq,
message, presence stuff ... to come soon.
2012-07-06 11:47:15 +01:00
Matt Goodall ad000735ff Move flag vars out of main(). 2012-07-06 11:15:51 +01:00
Matt Goodall 359c6a324b Document the client config. 2012-07-06 11:07:42 +01:00
Matt Goodall 2426f2d6d1 Rename JID.Local to JID.Node to better match official XEP. 2012-07-06 11:04:59 +01:00
Matt Goodall 6da9c080d4 JID Full() vs String() and docs. 2012-07-06 10:59:13 +01:00
Matt Goodall b908366544 Extract startClient function. 2012-06-27 13:16:11 +01:00
Matt Goodall 4e7d9e68d1 Move xml declaration to stream. 2012-06-27 13:15:11 +01:00
Matt Goodall 7cf14c4f35 Add component API and example. 2012-06-27 13:14:18 +01:00
Matt Goodall 9933414cc1 Rename demo -> client to make way for component example. 2012-06-27 12:10:57 +01:00
Matt Goodall fe67025b94 Don't expose client struct. 2012-06-27 12:10:22 +01:00
Matt Goodall a793114fdf Basic XMPP client with TLS and SASL. 2012-06-27 12:05:07 +01:00
Matt Goodall a76c53f05f Basic ignores. 2012-06-27 12:04:48 +01:00