Functions implemented
Time
- sleep(seconds) -> co_sleep
TCP/UDP
- accept -> co_accept
- recv -> co_recv
- send -> co_send
git clone https://github.com/vitdevelop/coroutine_epoll.git
cd coroutine_epoll
make
make clean
./main
telnet localhost 8080
See coroutine.h
file
Notes:
- Userspace IO stdout buffer should be disabled
setbuf(stdout, NULL)
because memory leaks detected. (Unknown why)- If userspace IO stdout buffer is disabled, make sure that
\n
is put at end of line to prevent segmentation fault.