/iPhoneSample/Frameworks/FSKit.framework/Versions/A/Headers/SimpleHTTPServer.h
http://fskit.googlecode.com/ · C Header · 44 lines · 23 code · 10 blank · 11 comment · 0 complexity · fafb155667a927f619e6aacda232c719 MD5 · raw file
- //
- // SimpleHTTPServer.h
- // Web2PDF Server
- //
- // Created by J?rgen on 19.09.06.
- // Copyright 2006 Cultured Code.
- // License: Creative Commons Attribution 2.5 License
- // http://creativecommons.org/licenses/by/2.5/
- //
- #import <Foundation/Foundation.h>
- @class SimpleHTTPConnection;
- @interface SimpleHTTPServer : NSObject {
- unsigned port;
- id delegate;
- NSSocketPort *socketPort;
- NSFileHandle *fileHandle;
- NSMutableArray *connections;
- NSMutableArray *requests;
- NSDictionary *currentRequest;
- }
- - (id)initWithTCPPort:(unsigned)po delegate:(id)dl;
- - (NSArray *)connections;
- - (NSArray *)requests;
- - (void)closeConnection:(SimpleHTTPConnection *)connection;
- - (void)newRequestWithURL:(NSURL *)url connection:(SimpleHTTPConnection *)connection;
- // Request currently being processed
- // Note: this need not be the most recently received request
- - (NSDictionary *)currentRequest;
- - (void)replyWithStatusCode:(int)code
- headers:(NSDictionary *)headers
- body:(NSData *)body;
- - (void)replyWithData:(NSData *)data MIMEType:(NSString *)type;
- - (void)replyWithStatusCode:(int)code message:(NSString *)message;
- @end