xmpp

package
v0.0.0-...-d23582d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2014 License: BSD-2-Clause, MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const NAME xml.name = xml.Name{Space: "http://etherx.jabber.org/streams", Local: "stream"}

Variables

This section is empty.

Functions

func Handle

func Handle(c net.Conn, l net.Listener) error

Types

type Stanza

type Stanza struct {
	Id      string `xml:"id,attr"`
	Inner   string `xml:",innerxml"`
	Sto     string `xml:"to,attr"`
	Sfrom   string `xml:"from,attr"`
	Body    string `xml:,chardata"`
	XMLName xml.Name
}

func NewStanza

func NewStanza(raw string) (*Stanza, error)

func (*Stanza) From

func (s *Stanza) From() (jid.JID, error)

func (*Stanza) To

func (s *Stanza) To() (jid.JID, error)

type Stream

type Stream struct {
	STo     string   `xml:"to,attr"`
	SFrom   string   `xml:"from,attr"`
	Version string   `xml:"version,attr"`
	Xmlns   string   `xml:"xmlns,attr"`
	Lang    string   `xml:"lang,attr"`
	Id      string   `xml:"id,attr"`
	Name    xml.Name `xml:"http://etherx.jabber.org/streams stream"`
}

func NewStream

func NewStream(to jid.JID, from jid.JID, xmlns string, id string) (*Stream, error)

func (*Stream) Bytes

func (s *Stream) Bytes() []byte

func (*Stream) From

func (s *Stream) From() (jid.JID, error)

func (*Stream) FromStartElement

func (stream *Stream) FromStartElement(start xml.StartElement) error

func (*Stream) FromString

func (stream *Stream) FromString(raw string) error

func (*Stream) String

func (s *Stream) String() string

func (*Stream) To

func (s *Stream) To() (jid.JID, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL