func (c *Connection) SendRawf(format string, a ...interface{}) error {
	_, err := fmt.Fprintf(c.Raw, format, a...)
	return err
}
SendRawf formats and sends a string across the connection
package xmpp
import (
	"encoding/xml"
	"errors"
	"fmt"
	"net"
	"reflect"
)
type Connection struct {
	Raw          net.Conn
	MessageTypes map[xml.Name]reflect.Type
	out          *xml.Encoder
	in           *xml.Decoder
}
func NewConn(raw net.Conn, MessageTypes map[xml.Name]reflect.Type) *Connection {
	conn := &Connection{
		Raw:          raw,
		MessageTypes: MessageTypes,
		in:           xml.NewDecoder(raw),
		out:          xml.NewEncoder(raw),
	}
	return conn
}
func (c *Connection) Next() (xml.StartElement, error) {
	for {
		nextToken, err := c.in.Token()
		if err != nil {
			return xml.StartElement{}, err
		}
		switch nextToken.(type) {
		case xml.StartElement:
			return nextToken.(xml.StartElement), nil
		}
	}
}
func (c *Connection) Read(se xml.StartElement) (xml.Name, interface{}, error) {
	var messageInterface interface{}
	if messageType, present := c.MessageTypes[se.Name]; present {
		messageInterface = reflect.New(messageType).Interface()
	} else {
		return xml.Name{}, nil, errors.New("Unknown XMPP message " + se.Name.Space + " <" + se.Name.Local + "/>")
	}
	if err := c.in.DecodeElement(messageInterface, &se); err != nil {
		return xml.Name{}, nil, err
	}
	return se.Name, messageInterface, nil
}
func (c *Connection) SendStanza(s interface{}) error {
	data, err := xml.Marshal(s)
	if err != nil {
		return err
	}
	_, err = c.Raw.Write(data)
	return err
}
func (c *Connection) SendRaw(s string) error {
	_, err := c.Raw.Write([]byte(s))
	return err
}