summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 33139b6..38aec51 100644
--- a/src/main.c
+++ b/src/main.c
@@ -32,8 +32,9 @@ int main() {
perror("could not accept connection");
return 1;
}
- const char *buf = "Hello from telnet!\n";
- write(conn, buf, strlen(buf));
+ char buf[1024];
+ ssize_t n = read(conn, buf, sizeof(buf));
+ write(conn, buf, n);
close(conn);
}
return 0;