     let url: URL
     let expectedMimeType: String
 
+    weak var delegate: SHOUTcastStreamDelegate?
+
     private let queue = { () -> OperationQueue in
         var queue = OperationQueue()
         queue.maxConcurrentOperationCount = 1

    }

    private func makeURLRequest() -> URLRequest {
        let request = URLRequest(url: url)
        // FIXME handle response
        //request.setValue("1", forHTTPHeaderField: "icy-metadata")
        return request
    }



    private let session: URLSession

    private var task: URLSessionDataTask?

    private var metadataInterval: Int?
    private var nextMetadataInterval: Int?

    private var unprocessedMetadataCount: Int?
    private var unprocessedMetadata: Data?

    init(url: URL, mimeType expectedMimeType: String) {
        self.url = url
