summaryrefslogtreecommitdiff
path: root/xmpp/encoder_decoder.go
AgeCommit message (Collapse)Author
2023-07-01Add log module based XML logging with prefixxengineering
The prefix is re-implemented with this commit to distinguish between RX and TX XML. Furthermore the logging is now based on the log module to have the same (e.g. timestamp) prefix as other log messages.
2023-07-01Implement byte-based logging for RXxengineering
This commit uses an io.TeeReader to achieve the same goal for RX like in the previous commit for TX.
2023-07-01Implement byte-based logging for TXxengineering
Using an io.MultiWriter it is trivially possible to write encoded tokens to the TCP channel aswell as to stdout. The disadvantage is that it is not possible to inject prefix data like the so far used `C: ` only for stdout and not for the TCP channel. Such a prefix is not wanted in the TCP channel and thus not wanted for both. The solution to get a nice log is to implement a transparent logging middleware which gets the raw TX stream and inserts a prefix at each line before sending to stdout.
2023-06-27Apply go fmtxengineering
2023-06-16Add chan xml.Token xmpp.session.rxxengineering
This allows the goroutine which fetches all tokens from the server to forward them to the main goroutine of the session.
2023-06-05Re-implement XML decodingxengineering
2023-06-05Re-implement XML encodingxengineering
2023-06-04Implement dummy XML encoder and decoderxengineering