轻量的HTTP server GCDWebServer
- 授权协议: BSD
- 开发语言: Objective-C
- 操作系统: OS X
- 软件首页: https://github.com/swisspol/GCDWebServer
- 软件文档: 由swisspol提供的开源库GCDWebServer是一个轻量的HTTP server,它基于 GCD 并可用于 OS X & iOS,该库还实现了基于web的文件上传以及 WebDAV server等扩展功能。
软件介绍
由swisspol提供的开源库GCDWebServer是一个轻量的HTTP server,它基于 GCD 并可用于 OS X & iOS,该库还实现了基于web的文件上传以及 WebDAV server等扩展功能。
使用方法:
#import "GCDWebServer.h"
#import "GCDWebServerDataResponse.h"
static GCDWebServer* _webServer = nil; // This should really be an ivar of your application's delegate class
- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions {
// Create server
_webServer = [[GCDWebServer alloc] init];
// Add a handler to respond to GET requests on any URL
[_webServer addDefaultHandlerForMethod:@"GET"
requestClass:[GCDWebServerRequest class]
processBlock:^GCDWebServerResponse *(GCDWebServerRequest* request) {
return [GCDWebServerDataResponse responseWithHTML:@"<html><body><p>Hello World</p></body></html>"];
}];
// Start server on port 8080
[_webServer startWithPort:8080 bonjourName:nil];
return YES;
}
Building Social Web Applications
Gavin Bell / O'Reilly Media / 2009-10-1 / USD 34.99
Building a social web application that attracts and retains regular visitors, and gets them to interact, isn't easy to do. This book walks you through the tough questions you'll face if you're to crea......一起来看看 《Building Social Web Applications》 这本书的介绍吧!
