NuHTTP Class Reference

NuHTTPConnection

A model for a web server's connection to a client.

Superclass: NSObject
Declared in: objc/NuHTTPConnection.h

A NuHTTPConnection manages the connection between the NuHTTP server and a client. It is created by NuHTTPServer instances in response to a new connection. The NuHTTPConnection then receives data and constructs request objects (represented with NSDictionary instances) to represent each complete request that it receives.

Methods

- (NSMutableData *) body
Get the body of the most recent request.

in objc/NuHTTPConnection.h

- (NSString *) clientAddress
Get the address of the connection client.

in objc/NuHTTPConnection.h

- (NSFileHandle *) fileHandle
Get the file handle for a connection.

in objc/NuHTTPConnection.h

- (NSDictionary *) headers
Get the headers for the most recent request.

in objc/NuHTTPConnection.h

- (id) initWithFileHandle: (NSFileHandle *) f
server: (NuHTTPServer *) s
Initialize a connection with a file handle and server. Used internally.

in objc/NuHTTPConnection.h

- (NSString *) method
Get the request method used for the most recent request.

in objc/NuHTTPConnection.h

- (void) setClientAddress: (NSString *) value
Set the address of the connection client. Used internally.

in objc/NuHTTPConnection.h