summaryrefslogtreecommitdiff
path: root/xmpp/streams.go
diff options
context:
space:
mode:
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"},