diff options
author | Juan Manuel Tomás <jtomas1815@gmail.com> | 2020-07-10 21:59:52 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-10 21:59:52 -0300 |
commit | 7908b37141271f671a31f5dc7dd6341a037a4b27 (patch) | |
tree | a642972e425533e91e3d46eb6fb71d2bc276f076 /jet.cpp | |
parent | f333658aa8be007128472b66291124c348e935ea (diff) | |
parent | c4c5be557abb30166dbc49770a0151671ab1bf07 (diff) | |
download | jet-7908b37141271f671a31f5dc7dd6341a037a4b27.tar.gz jet-7908b37141271f671a31f5dc7dd6341a037a4b27.zip |
Merge pull request #7 from jmtomas/6
6
Diffstat (limited to 'jet.cpp')
-rw-r--r-- | jet.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -3,6 +3,8 @@ #include <string.h> #include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> #include <sys/socket.h> #include <netinet/ip.h> #include <arpa/inet.h> @@ -48,7 +50,7 @@ void parse_command(char *command, Client *client) { int main() { Buffer scratch("scratch"); - scratch.read("LICENSE"); + scratch.read_file("LICENSE"); int listener = create_listener(); @@ -62,7 +64,7 @@ int main() { epoll_event events[MAX_EVENTS]; Client *clients[1024] = {}; - for (;;) { + while (true) { int nfds = epoll_wait(epollfd, events, MAX_EVENTS, -1); for (int i = 0; i < nfds; i++) { |