Skip to content

Commit

Permalink
header refactored
Browse files Browse the repository at this point in the history
  • Loading branch information
yedf committed Jun 19, 2015
1 parent a7beab1 commit cec6a21
Show file tree
Hide file tree
Showing 15 changed files with 38 additions and 42 deletions.
39 changes: 25 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,14 @@ MacOSX上使用kqueue

[http://www.oschina.net/p/c11-handy](http://www.oschina.net/p/c11-handy)

###支持半同步半异步处理

异步管理网络I/O,同步处理请求,可以简化服务器处理逻辑的编写,示例参见examples/hsha.cc

###openssl支持

异步连接管理,支持openssl连接

###protobuf支持

使用protobuf的消息encode/decode示例在protobuf下

###简洁

10行代码能够编写一个完整的服务器

###代码示例--echo-server

```c
#include <handy/conn.h>
#include <handy/daemon.h>
#include <handy/handy.h>

using namespace std;
using namespace handy;
Expand All @@ -62,6 +49,30 @@ int main(int argc, const char* argv[]) {
}
```
###支持半同步半异步处理
异步管理网络I/O,同步处理请求,可以简化服务器处理逻辑的编写,示例参见examples/hsha.cc
###openssl支持
异步连接管理,支持openssl连接
###protobuf支持
使用protobuf的消息encode/decode示例在protobuf下
###支持半同步半异步处理
异步管理网络I/O,同步处理请求,可以简化服务器处理逻辑的编写,示例参见examples/hsha.cc
###openssl支持
异步连接管理,支持openssl连接
###protobuf支持
使用protobuf的消息encode/decode示例在protobuf下
###安装与使用
```
Expand Down
5 changes: 1 addition & 4 deletions examples/chat.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#include <handy/conn.h>
#include <handy/logging.h>
#include <handy/daemon.h>
#include <handy/codec.h>
#include <handy/handy.h>
#include <map>

using namespace std;
Expand Down
5 changes: 1 addition & 4 deletions examples/codec-cli.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#include <handy/conn.h>
#include <handy/logging.h>
#include <handy/daemon.h>
#include <handy/codec.h>
#include <handy/handy.h>

using namespace std;
using namespace handy;
Expand Down
3 changes: 1 addition & 2 deletions examples/codec-svr.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include <handy/conn.h>
#include <handy/daemon.h>
#include <handy/handy.h>

using namespace std;
using namespace handy;
Expand Down
4 changes: 1 addition & 3 deletions examples/daemon.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#include <handy/conn.h>
#include <handy/conf.h>
#include <handy/daemon.h>
#include <handy/handy.h>

using namespace std;
using namespace handy;
Expand Down
3 changes: 1 addition & 2 deletions examples/echo.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include <handy/conn.h>
#include <handy/daemon.h>
#include <handy/handy.h>

using namespace std;
using namespace handy;
Expand Down
3 changes: 1 addition & 2 deletions examples/hsha.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include <handy/conn.h>
#include <handy/daemon.h>
#include <handy/handy.h>

using namespace std;
using namespace handy;
Expand Down
3 changes: 1 addition & 2 deletions examples/http-echo.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include <handy/http.h>
#include <handy/daemon.h>
#include <handy/handy.h>

using namespace std;
using namespace handy;
Expand Down
3 changes: 1 addition & 2 deletions examples/stat.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include <handy/http.h>
#include <handy/daemon.h>
#include <handy/handy.h>
#include <handy/stat-svr.h>

using namespace std;
Expand Down
4 changes: 1 addition & 3 deletions examples/write-on-empty.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#include <handy/conn.h>
#include <handy/daemon.h>
#include <thread>
#include <handy/handy.h>

using namespace std;
using namespace handy;
Expand Down
2 changes: 1 addition & 1 deletion handy/conn.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include "handy.h"
#include "event_base.h"

namespace handy {

Expand Down
2 changes: 1 addition & 1 deletion handy/handy.cc → handy/event_base.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "handy.h"
#include "event_base.h"
#include "logging.h"
#include "util.h"
#include <map>
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion handy/poller.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "handy.h"
#include "event_base.h"
#include "logging.h"
#include "util.h"
#include <map>
Expand Down
2 changes: 1 addition & 1 deletion handy/stat-svr.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include "slice.h"
#include "handy.h"
#include "event_base.h"
#include "http.h"
#include <map>
#include <functional>
Expand Down

0 comments on commit cec6a21

Please sign in to comment.