Posts: 190
Joined: Wed Jan 02, 2013 8:28 am

[TCP] Server/client non blocking: missing sys/event.h?

Thu Mar 28, 2019 1:53 pm

Hi guys, I need to write C program for TCP server (TCP to serial bridge RFC 2217).

First step would be creating TCP server; I'm a noob about TCP server programming so I've found online TCP server examples: ... o-server.c

But when compiling it's missing event.h:
tcp-non-blocking-echo-server.c:10:23: fatal error: sys/event.h: No such file or directory
Then I used /usr/lib/event.h, but here missing kqueue function.

Where can I find running example of TCP server? Thanks.

Posts: 393
Joined: Sat Oct 14, 2017 9:57 pm

Re: [TCP] Server/client non blocking: missing sys/event.h?

Sun Mar 31, 2019 8:34 pm


Auch, that's a terrible example with lots of unecessary dependencies. TCP communication is a lot simpler than that, try one of these: ... -serv.html (lwip lib) ... ets-linux/ (plain posix sockets) ... tion-in-c/ (also very simple and minimal)


Return to “C/C++”