1
0
Fork 0
Commit Graph

107 Commits

Author SHA1 Message Date
Matt Goodall 32bf10887c Keep filters in ordered list, with most recent at head. 2012-07-10 19:03:28 +01:00
Matt Goodall c31efeffe5 Protect XMPP filters from concurrent access. 2012-07-10 17:25:55 +01:00
Matt Goodall 15a35ce4ff Separate sections of attrs with useful comments. 2012-07-10 17:25:25 +01:00
Matt Goodall cf45380866 Only call with attrs that need to be non-zero. 2012-07-10 17:12:54 +01:00
Matt Goodall c33950f532 Fix EOF's package in overview doc. 2012-07-10 15:18:35 +01:00
Matt Goodall 38b727ed46 Fix client creation example code in overview docs. 2012-07-10 15:11:39 +01:00
Matt Goodall 5ab3a9be80 Extract/improve auth response check - it's common to all mechanisms. 2012-07-10 13:14:46 +01:00
Matt Goodall 6ccf6e41a8 Rename auth struct field. 2012-07-10 13:13:13 +01:00
Matt Goodall 32df77187c Make authentication a little more pluggable. 2012-07-10 12:27:29 +01:00
Matt Goodall 5966340a3a Package overview doc. 2012-07-10 10:45:16 +01:00
Matt Goodall de111bc744 Turn googletalk.go into a generic XMPP message tail tool. 2012-07-10 10:43:00 +01:00
Matt Goodall 2a32fc1e44 Add home server from JID lookup helper. 2012-07-10 10:35:39 +01:00
Matt Goodall 2776e78613 Nicer var name to it's clearer it's an error. 2012-07-10 10:08:49 +01:00
Matt Goodall c64a5bc2fe Add example of Google Talk. 2012-07-09 15:11:25 +01:00
Matt Goodall b752357c8d Remap EOF to ErrUnexpectedEOF now we're checking for end of stream. 2012-07-09 15:04:57 +01:00
Matt Goodall 6b01a7f10c Cleanly detect & signal end of stream, and fix code above. 2012-07-09 15:01:15 +01:00
Matt Goodall 5536f034bd Improve fatal error message. 2012-07-09 14:48:04 +01:00
Matt Goodall 4759e83863 Add <error/> stanza. 2012-07-09 14:47:50 +01:00
Matt Goodall b13d0baad0 Simplify error creation. 2012-07-09 13:27:49 +01:00
Matt Goodall 7a91f5d8ea Send stream's version='1.0' attr. 2012-07-09 02:51:16 +01:00
Matt Goodall e2c05fea94 Send xml PI encoding. Route through Stream.send for logging. 2012-07-09 02:50:43 +01:00
Matt Goodall 56a481ff8e No client config means default config. 2012-07-09 02:49:04 +01:00
Matt Goodall dc447769b2 go fmt 2012-07-09 02:21:18 +01:00
Matt Goodall 6a42d26a31 Log stanzas sent to the XMPP component. 2012-07-09 02:19:10 +01:00
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