 		}
 	}
 	
-	private func handleReceivedMessage(message:Any) {
+	func handleReceivedMessage(message:Any) {
 		if let stringMessage = message as? String {
 			let jsonMessage = JSON.parse(stringMessage)
 			if let response = ServerResponse.parseResponse(jsonMessage) {

		}
	}
	
	private func handleFileResponse(transId:String, operation:FileOperation, file:File) {
		switch(operation) {
		case .Duplicate:
			//TODO: support

		attrs["content"] = MessageValue.forValue(document.currentContents)
		encoder.encodeValue(MessageValue.DictionaryValue(MessageValueDictionary(attrs)))
		data.appendData(encoder.data!)
		data.writeToURL(NSURL(fileURLWithPath: "/tmp/lastSaveToServer"), atomically: true)
		return uniqueIdent
	}
	
	///processes a binary response from the WebSocket
	/// - parameter data: The MessagePack data
	func processBinaryResponse(data:NSData) {
		var parsedValues:[MessageValue]? = nil
		let decoder = MessagePackDecoder(data: data)
		do {
