Documentation ¶
Index ¶
- type Config
- 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) 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 Config ¶
type Config 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 }
Config structure is used to establish XMPP session configuration.
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, cfg Config, logger kitlog.Logger) *Session
New creates a new session instance.
func (*Session) OpenComponent ¶
OpenComponent initializes a component session sending the proper XMPP payload.
func (*Session) OpenStream ¶
OpenStream initializes a session session sending the proper XMPP payload.
func (*Session) Receive ¶
func (ss *Session) Receive() (stravaganza.Element, error)
Receive returns next incoming session element.
func (*Session) SetFromJID ¶
SetFromJID updates current session from JID.
Click to show internal directories.
Click to hide internal directories.