diff options
author | xengineering <me@xengineering.eu> | 2023-07-04 16:37:27 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2023-07-04 16:37:27 +0200 |
commit | e529bab2e5df93ff8e9fd415b9d65e9bb6d17695 (patch) | |
tree | dac4a542de3c47f6f9bbb19f6fcf090cdbfb085f | |
parent | 7902764e053eb3b8b4d46f8d9caf47d2d5cddd7c (diff) | |
download | limox-e529bab2e5df93ff8e9fd415b9d65e9bb6d17695.tar limox-e529bab2e5df93ff8e9fd415b9d65e9bb6d17695.tar.zst limox-e529bab2e5df93ff8e9fd415b9d65e9bb6d17695.zip |
Introduce handle() as dummy
-rw-r--r-- | xmpp/routing.go | 9 | ||||
-rw-r--r-- | xmpp/session.go | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/xmpp/routing.go b/xmpp/routing.go index 2b1680f..b184b1c 100644 --- a/xmpp/routing.go +++ b/xmpp/routing.go @@ -22,3 +22,12 @@ func parse[T any](data T, s *xml.StartElement, d *xml.Decoder, c chan<- any) { c <- data } } + +func handle(element any) { + switch t := element.(type) { + case streamFeatures: + log.Println("Handling stream features ...") + default: + log.Printf("Unknown parsed element: %v", t) + } +} diff --git a/xmpp/session.go b/xmpp/session.go index 6abc343..a4120e9 100644 --- a/xmpp/session.go +++ b/xmpp/session.go @@ -64,7 +64,7 @@ func (s *session) run() { for { select { case e := <-s.rx: - log.Print(e) + handle(e) case signal := <-s.in: switch signal.(type) { case SessionShouldDisconnect: |