summaryrefslogtreecommitdiff
path: root/xmpp
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2023-09-04 22:47:31 +0200
committerxengineering <me@xengineering.eu>2023-09-04 22:47:31 +0200
commitdc8ff3e7d214c6a390f2aa5c794891b17c418640 (patch)
treea364e58464c4a2a4e829e7f087da52b9170f8bbe /xmpp
parent93668403433cbfc22fe9c38ebbd6ef67af625ad2 (diff)
downloadlimox-dc8ff3e7d214c6a390f2aa5c794891b17c418640.tar
limox-dc8ff3e7d214c6a390f2aa5c794891b17c418640.tar.zst
limox-dc8ff3e7d214c6a390f2aa5c794891b17c418640.zip
Add xmpp.SessionFrontend.Disconnect()session-struct
This is the first convenience function implemented inside the xmpp module but for the goroutine of the using application.
Diffstat (limited to 'xmpp')
-rw-r--r--xmpp/session.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/xmpp/session.go b/xmpp/session.go
index ad90c5e..2c9fbb3 100644
--- a/xmpp/session.go
+++ b/xmpp/session.go
@@ -18,6 +18,10 @@ type SessionFrontend struct {
Out chan any
}
+func (sf *SessionFrontend) Disconnect() {
+ go func() { sf.Out <- SessionShouldDisconnect{} }()
+}
+
type session struct {
jid string
pwd string