 
     var connection: Connection?
     var serializer: RequestSerializer?
-    var parser: ResponseParser?
+    var parser: MessageParser?
 
     public init(url: URL, configuration: Map = nil) throws {
         self.secure = try isSecure(url: url)

        return RequestSerializer(stream: connection)
    }

    private func getParser(connection: Connection) -> ResponseParser {
        if let parser = self.parser {
            return parser
        }
        return ResponseParser(stream: connection, bufferSize: self.bufferSize)
    }
}


        do {
            // TODO: Add deadline to serializer
            try serializer.serialize(request)
            
            var response: Response!
            while !connection.closed {
                let chunk = try connection.read(upTo: bufferSize, deadline: requestDeadline)
                try parser.parse(chunk) { message in
                    response = message as! Response
                }
            }

            if let upgrade = request.upgradeConnection {
                try upgrade(response, connection)
