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
}
NewConn creates a Connection struct for a given net.Conn and message system
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
}