mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2025-11-21 17:13:44 -08:00
Add SendIQ to StreamClient and Sender
This makes it possible to use SendIQ from PostConnect and route handlers.
This commit is contained in:
committed by
Mickaël Rémond
parent
a0e74051fd
commit
eda5c23c54
@@ -1,6 +1,7 @@
|
||||
package xmpp
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"sync"
|
||||
"time"
|
||||
@@ -26,6 +27,7 @@ type StreamClient interface {
|
||||
Connect() error
|
||||
Resume(state SMState) error
|
||||
Send(packet stanza.Packet) error
|
||||
SendIQ(ctx context.Context, iq stanza.IQ) (chan stanza.IQ, error)
|
||||
SendRaw(packet string) error
|
||||
Disconnect()
|
||||
SetHandler(handler EventHandler)
|
||||
@@ -35,6 +37,7 @@ type StreamClient interface {
|
||||
// It is mostly use in callback to pass a limited subset of the stream client interface
|
||||
type Sender interface {
|
||||
Send(packet stanza.Packet) error
|
||||
SendIQ(ctx context.Context, iq stanza.IQ) (chan stanza.IQ, error)
|
||||
SendRaw(packet string) error
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user