mattstevens/RoutingHTTPServer — pull request #8 by morten-holm (2013-07-12 11:59:39+00:00)
Title: Make remote client IP available on the RouteRequest

This allows for differentiated behaviour based on client remote ip.

Example:

[self.httpServer handleMethod:@"GET" withPath:@"/" block:^(RouteRequest *request, RouteResponse *response) {
RoutingConnection *connection = request.connection;
NSString *connectedHost = [connection connectedHost];

[response setStatusCode:200];
[response setHeader:@"Content-Type" value:@"text/html"];
[response respondWithString:[NSString stringWithFormat:@"Hello World [%@]", connectedHost];
}];