summaryrefslogtreecommitdiff
path: root/xmpp/xml.go
diff options
context:
space:
mode:
Diffstat (limited to 'xmpp/xml.go')
-rw-r--r--xmpp/xml.go19
1 files changed, 12 insertions, 7 deletions
diff --git a/xmpp/xml.go b/xmpp/xml.go
index 14c6637..36d7eb1 100644
--- a/xmpp/xml.go
+++ b/xmpp/xml.go
@@ -22,13 +22,18 @@ func runRx(ctx context.Context, chn chan xml.Token, conn *tls.Conn) {
default:
t, err := d.Token()
if t != nil && err == nil {
- switch t.(type) {
- case xml.ProcInst:
- case xml.Directive:
- case xml.Comment:
- default:
- c := xml.CopyToken(t)
- chn <- c
+ switch e := t.(type) {
+ case xml.StartElement:
+ if e.Name.Local == "stream" {
+ // new server-side stream TODO what to do with this info?
+ } else {
+// route(&e, &d, chn, getRoutingTable())
+ }
+ case xml.EndElement:
+ if e.Name.Local == "stream" {
+ // TODO end complete session
+ return
+ }
}
}
if err != nil {