Age | Commit message (Collapse) | Author |
|
This is the first convenience function implemented inside the xmpp
module but for the goroutine of the using application.
|
|
Some parts of the `xmpp` module functionality should be written for the
using application software. To reference a running session more easily
it is an advantage to have an opaque struct for this instead of
decoupled channels.
|
|
|
|
To make message passing to the XMPP session channel non-blocking short
living Goroutines are used. Before this commit they were executing
closures which capture l as xengineering.eu/limox.Limox pointer and used
it to get the channel where the message should be passed to.
While channels are safe with respect to race conditions, structs are
not. Thus the member access of the Limox struct was a race condition in
certain side cases like bad network connection where those Goroutines
lived for a longer time.
The solution is to make a copy of the l.sessionIn channel and use this
copy in the closures. This is valid since channels do not need pointers
to them and furthermore are thread safe.
|
|
This reduces the risk of using those channels wrong.
|
|
|
|
|
|
|
|
Minimal step towards session-based XMPP architecture.
|
|
The current log policy is to be quiet if nothing failed to allow to
focus on relevant messages.
|
|
|
|
|
|
|
|
|
|
|
|
The XMPP logic is now big enough to create a corresponding package for
it.
|
|
Error handling was not consistent and quite bad to be honest ...
|
|
|
|
The <stream> element is the first to encode and is added with this
commit.
|
|
|