summaryrefslogtreecommitdiff
path: root/jet.cpp
diff options
context:
space:
mode:
authorJuan Manuel Tomás <jtomas1815@gmail.com>2020-07-10 21:24:20 -0300
committerJuan Manuel Tomás <jtomas1815@gmail.com>2020-07-10 21:24:20 -0300
commit5c8326ae953eee1cd36711a7769cff624f312864 (patch)
tree90df61ea0eb7ef6aae606fd031e2509545a1efba /jet.cpp
parentf333658aa8be007128472b66291124c348e935ea (diff)
downloadjet-5c8326ae953eee1cd36711a7769cff624f312864.tar.gz
jet-5c8326ae953eee1cd36711a7769cff624f312864.zip
Implement file reading using read syscall
Diffstat (limited to 'jet.cpp')
-rw-r--r--jet.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/jet.cpp b/jet.cpp
index c4e997c..1a2e9c9 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();