mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-11-30 02:47:56 +08:00
modify readme
This commit is contained in:
parent
dd0158f5ac
commit
488ea4d473
@ -243,11 +243,11 @@ private:
|
||||
void run(void) {
|
||||
char buf[256];
|
||||
while (true) {
|
||||
int ret = conn->read(buf, sizeof(buf), false);
|
||||
int ret = conn_->read(buf, sizeof(buf), false);
|
||||
if (ret <= 0) {
|
||||
break;
|
||||
}
|
||||
if (conn->write(buf, ret) != ret) {
|
||||
if (conn_->write(buf, ret) != ret) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -258,18 +258,18 @@ private:
|
||||
|
||||
class fiber_server : public acl::fiber {
|
||||
public:
|
||||
fiber_server(acl::server_socket* server) : server_(server) {}
|
||||
fiber_server(acl::server_socket& server) : server_(server) {}
|
||||
|
||||
private:
|
||||
~fiber_server(void) { delete server_; }
|
||||
~fiber_server(void) {}
|
||||
|
||||
private:
|
||||
acl::server_socket* server_;
|
||||
acl::server_socket& server_;
|
||||
|
||||
// @override
|
||||
void run(void) {
|
||||
while (true) {
|
||||
acl::socket_stream* conn = server.accept();
|
||||
acl::socket_stream* conn = server_.accept();
|
||||
if (conn) {
|
||||
acl::fiber* fb = new fiber_client(conn);
|
||||
fb->start();
|
||||
|
Loading…
Reference in New Issue
Block a user