summaryrefslogtreecommitdiff
path: root/xmpp/streams.go
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2023-07-04 12:33:12 +0200
committerxengineering <me@xengineering.eu>2023-07-04 12:35:49 +0200
commit9f87ef34c589825d65824a8c9210fed5bf92f94d (patch)
tree778c7972b8e3bf137581780343b6bf7f5ba1b286 /xmpp/streams.go
parent5932556e7051690e262a5ee39263b7905bf1ba20 (diff)
downloadlimox-9f87ef34c589825d65824a8c9210fed5bf92f94d.tar
limox-9f87ef34c589825d65824a8c9210fed5bf92f94d.tar.zst
limox-9f87ef34c589825d65824a8c9210fed5bf92f94d.zip
Remove runStreamPair()
This will not be used in the new RX concept.
Diffstat (limited to 'xmpp/streams.go')
-rw-r--r--xmpp/streams.go29
1 files changed, 0 insertions, 29 deletions
diff --git a/xmpp/streams.go b/xmpp/streams.go
index 5ba4c1d..388be4d 100644
--- a/xmpp/streams.go
+++ b/xmpp/streams.go
@@ -5,35 +5,6 @@ import (
"log"
)
-func runStreamPair(s *session) {
- end := openStream(s)
- defer closeStream(s, end)
-
- buf := newElementBuffer()
-
- for {
- select {
- case data := <-s.in:
- switch data.(type) {
- case SessionShouldDisconnect:
- return
- default:
- log.Printf("Unknown data '%d'!\n", data)
- }
- case t := <-s.rx:
- err := buf.add(t)
- if err != nil {
- log.Printf("Could not add XML token to buffer: %v\n", err)
- return
- }
- if buf.isComplete() {
- element := buf.reset()
- route(s, element, getRoutingTable())
- }
- }
- }
-}
-
func openStream(s *session) xml.EndElement {
start := xml.StartElement{
xml.Name{"jabber:client", "stream:stream"},