diff options
| author | cashmere <cashmere@autistici.org> | 2026-06-22 16:00:40 +0200 |
|---|---|---|
| committer | cashmere <cashmere@autistici.org> | 2026-06-22 16:00:40 +0200 |
| commit | 6226724f508c7f03a69dc2712aca862f057181cb (patch) | |
| tree | 2e2a95bf000a9a80940fd6a4fdd99879817edf3b | |
| parent | ebb563bf5c3ea39edce6d35457578a2f66724461 (diff) | |
| download | telnet-6226724f508c7f03a69dc2712aca862f057181cb.tar.gz | |
src/main.c: create socket
| -rw-r--r-- | src/main.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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; +} |
