 
 				channel.triggerEvent(
 					message.event,
-					ref: message.ref,
 					payload: message.payload
 				)
 			}

		webSocketDidError(error)
	}

	@objc public func webSocketMessageData(data: NSData) {
		webSocketDidReceiveMessage(data)
	}

	@objc public func webSocketClose(code: Int, reason: String, wasClean: Bool) {

		onSocketOpen?()
	}

	private func webSocketDidReceiveMessage(messageStr: String) {
		guard let messageData = messageStr.dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: false) else {
			return
		}

		do {
			let message: Message = try Unbox(messageData)

