         let presence = XMPPPresence(type: "unavailable")
         self.xmppStream.send(presence)
     }
-
+    
     
     public func sendMessage(message:String, to:String) {
         let message = "Yo!"


open class XMPPConnection:NSObject{
    var xmppStream: XMPPStream

    let hostName: String
    let userJID: XMPPJID
    let hostPort: UInt16
    let password: String
    
    var xmppDelegate:XMPPDelegate?

    
    public init(hostName: String, userJIDString: String, hostPort: UInt16 = 5222, password: String, delegate:XMPPDelegate) {
        
        self.hostName = hostName
        self.hostPort = hostPort
        self.password = password

        let userJID = XMPPJID(string: userJIDString)
        
        self.xmppStream = XMPPStream()

        
        try! self.xmppStream.connect(withTimeout: XMPPStreamTimeoutNone)
    }
    
    public func disconnect(){
        goOffline()
        self.xmppStream.disconnect()
