summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcashmere <cashmere@autistici.org>2026-06-22 16:00:40 +0200
committercashmere <cashmere@autistici.org>2026-06-22 16:00:40 +0200
commit6226724f508c7f03a69dc2712aca862f057181cb (patch)
tree2e2a95bf000a9a80940fd6a4fdd99879817edf3b
parentebb563bf5c3ea39edce6d35457578a2f66724461 (diff)
downloadtelnet-6226724f508c7f03a69dc2712aca862f057181cb.tar.gz
src/main.c: create socket
-rw-r--r--src/main.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index e69de29..43d5b88 100644
--- a/src/main.c
+++ b/src/main.c
@@ -0,0 +1,12 @@
+#include <stdio.h>
+#include <sys/socket.h>
+
+int main() {
+ int server = socket(AF_INET, SOCK_STREAM, 0);
+ if (server == -1) {
+ perror("could not open socket");
+ return 1;
+ }
+ printf("hello world\n");
+ return 0;
+}