summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--limox.go2
-rw-r--r--xmpp/session.go5
2 files changed, 4 insertions, 3 deletions
diff --git a/limox.go b/limox.go
index 234ca48..87e20de 100644
--- a/limox.go
+++ b/limox.go
@@ -26,7 +26,7 @@ type Limox struct {
JidEditor widget.Editor
PwdEditor widget.Editor
MainButton widget.Clickable
- sessionIn chan any
+ sessionIn chan<- any
sessionOut chan any
State LimoxState
Window *app.Window
diff --git a/xmpp/session.go b/xmpp/session.go
index 1bd9bd5..88a01ae 100644
--- a/xmpp/session.go
+++ b/xmpp/session.go
@@ -13,14 +13,15 @@ type SessionShouldDisconnect struct{}
type session struct {
jid string
- in, out chan any
+ in chan any
+ out chan<- any
transport *tls.Conn
ed encoderDecoder
rx chan xml.Token
streamEnd xml.EndElement
}
-func StartSession(out chan any, jid string, pwd string) (in chan any) {
+func StartSession(out chan<- any, jid string, pwd string) (in chan<- any) {
s := session{}
s.jid = jid