mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-11-30 02:47:56 +08:00
Modify fiber's readme
This commit is contained in:
parent
8224e8888a
commit
846358ee6f
@ -310,12 +310,12 @@ int main(void) {
|
||||
}
|
||||
|
||||
// Create one server coroutine to wait for connection.
|
||||
go[&] {
|
||||
go[=, &server] {
|
||||
while (true) {
|
||||
acl::socket_stream* conn = server.accept();
|
||||
if (conn) {
|
||||
// Create one client coroutine to handle the connection.
|
||||
go[=] {
|
||||
go[conn] {
|
||||
char buf[256];
|
||||
while (true) {
|
||||
int ret = conn->read(buf, sizeof(buf), false);
|
||||
|
Loading…
Reference in New Issue
Block a user