* PubSub protocol support
Added support for :
- XEP-0050 (Command))
- XEP-0060 (PubSub)
- XEP-0004 (Forms)
Fixed the NewClient function by adding parsing of the domain from the JID if no domain is provided in transport config.
Updated xmpp_jukebox example
* Delete useless pubsub errors
* README.md update
Fixed import in echo example
* Typo
* Fixed raw send on client example
* Fixed jukebox example and added a README.md
This makes sending IQ more idiomatic Go, but more importantly it solves
a problem with contexts that were not being cancelled correctly with
the previous API.
As a side-effect of this change `Route.route` must now be invoked in a
go-routine to prevent deadlocks. This also allows for stanzas to be processed
in parallel, which can result in a nice performance win.
Simplify the API in several ways:
- provide the context to the IQ result handler, making it possible to pass in
extra context and handle timeouts within the handler.
- pass the stanza in as an IQ type, removing the need to always type-cast it
in the handler
- remove Router.HandleIqResult and Router.HandleFuncIqResult. Since the router
is private to Client nobody would ever use these, and they do not really make
things simpler anyway.
XMPP and WebSocket transports require different open and close stanzas. To
handle this the responsibility handling those and creating the XML decoder is
moved to the Transport.
This makes it possible to use a factory function to create a transport of the right type and not having to repeat the address when calling Transport.Connect()
* Add constants (enumlike) for stanza types
* NewIQ, NewMessage and NewPresence are now initialized with the Attrs struct
* Update examples
* Do not export backoff code. For now, we do not need to expose backoff in the documentation
* Make presence priority an int8