3 // Part of ASIHTTPRequest -> http://allseeing-i.com/ASIHTTPRequest
5 // Created by Ben Copsey on 10/08/2009.
6 // Copyright 2009 All-Seeing Interactive. All rights reserved.
9 #import <Foundation/Foundation.h>
11 @class ASIHTTPRequest;
13 // This is a wrapper for NSInputStream that pretends to be an NSInputStream itself
14 // Subclassing NSInputStream seems to be tricky, and may involve overriding undocumented methods, so we'll cheat instead.
15 // It is used by ASIHTTPRequest whenever we have a request body, and handles measuring and throttling the bandwidth used for uploading
17 @interface ASIInputStream : NSObject {
18 NSInputStream *stream;
19 ASIHTTPRequest *request;
21 + (id)inputStreamWithFileAtPath:(NSString *)path request:(ASIHTTPRequest *)request;
22 + (id)inputStreamWithData:(NSData *)data request:(ASIHTTPRequest *)request;
24 @property (retain, nonatomic) NSInputStream *stream;
25 @property (assign, nonatomic) ASIHTTPRequest *request;