     }
 
     func handleFayeMessages(messages: [[String: AnyObject]]) {
-
+        // TODO: handleFayeMessages
     }
 }
 
 // MARK: - SRWebSocketDelegate
 
 extension FayeClient: SRWebSocketDelegate {
+
+    public func webSocketDidOpen(webSocket: SRWebSocket!) {
+
+        sendBayeuxHandshakeMessage()
+    }
 
     public func webSocket(webSocket: SRWebSocket!, didReceiveMessage message: AnyObject!) {
 

    }
}

// MARK: - SRWebSocket

extension FayeClient {

        }
    }

    public func webSocket(webSocket: SRWebSocket!, didFailWithError error: NSError!) {

        connected = false

        clearSubscriptions()

        delegate?.fayeClient(self, didFailWithError: error)

        reconnect()
    }


}

