summaryrefslogtreecommitdiff
path: root/jet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'jet.cpp')
-rw-r--r--jet.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/jet.cpp b/jet.cpp
index c4e997c..3d45c75 100644
--- a/jet.cpp
+++ b/jet.cpp
@@ -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++) {