summaryrefslogtreecommitdiff
path: root/xmpp/xml.go
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2023-07-04 13:48:34 +0200
committerxengineering <me@xengineering.eu>2023-07-04 13:48:34 +0200
commit92534f5af88b42665ad44f2495fe5dfb116d3406 (patch)
tree53fe906edb6ce70f22e6602469b9ce4da5d55675 /xmpp/xml.go
parent45b04ef092a99d0d3f355e27896c82f1dbf15d28 (diff)
downloadlimox-92534f5af88b42665ad44f2495fe5dfb116d3406.tar
limox-92534f5af88b42665ad44f2495fe5dfb116d3406.tar.zst
limox-92534f5af88b42665ad44f2495fe5dfb116d3406.zip
First working version of new RX concept
This uses xml.Decoder.DecodeElement() which makes parsing way easier. This first step is just able to parse stream features partially.
Diffstat (limited to 'xmpp/xml.go')
-rw-r--r--xmpp/xml.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmpp/xml.go b/xmpp/xml.go
index 36d7eb1..470a2ef 100644
--- a/xmpp/xml.go
+++ b/xmpp/xml.go
@@ -9,7 +9,7 @@ import (
"log"
)
-func runRx(ctx context.Context, chn chan xml.Token, conn *tls.Conn) {
+func runRx(ctx context.Context, chn chan<- any, conn *tls.Conn) {
l := logger{"[RX] "}
r := io.TeeReader(conn, l)
@@ -27,7 +27,7 @@ func runRx(ctx context.Context, chn chan xml.Token, conn *tls.Conn) {
if e.Name.Local == "stream" {
// new server-side stream TODO what to do with this info?
} else {
-// route(&e, &d, chn, getRoutingTable())
+ route(&e, d, chn, getRoutingTable())
}
case xml.EndElement:
if e.Name.Local == "stream" {