Documentation ¶
Index ¶
- type Options
- type Session
- func (ss *Session) Close(ctx context.Context) error
- func (ss *Session) OpenComponent(ctx context.Context) error
- func (ss *Session) OpenStream(ctx context.Context, featuresElem stravaganza.Element) error
- func (ss *Session) Receive() (stravaganza.Element, error)
- func (ss *Session) Reset(tr transport.Transport) error
- func (ss *Session) Send(ctx context.Context, elem stravaganza.Element) error
- func (ss *Session) SetFromJID(jd *jid.JID)
- func (ss *Session) StreamID() string
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶ added in v0.50.0
type Options struct { // MaxStanzaSize defines the maximum stanza size that can be read from the session transport. MaxStanzaSize int // IsOut defines whether or not this is an initiating entity session. IsOut bool }
Options structure is used to establish XMPP session options.
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session represents an XMPP session between two peers.
func New ¶
func New(typ Type, identifier string, tr transport.Transport, hosts *host.Hosts, opts Options) *Session
New creates a new session instance.
func (*Session) OpenComponent ¶ added in v0.50.0
OpenComponent initializes a component session sending the proper XMPP payload.
func (*Session) OpenStream ¶ added in v0.50.0
OpenStream initializes a session session sending the proper XMPP payload.
func (*Session) SetFromJID ¶ added in v0.50.0
SetFromJID updates current session from JID.
Click to show internal directories.
Click to hide internal directories.