diff options
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -17,6 +17,14 @@ int main() { perror("could not bind socket"); return 1; } + int listen_addr = listen(sfd, 100); + if (listen_addr == -1) { + perror("could not listen"); + return 1; + } printf("hello world\n"); + + int ac = accept(sfd, (struct sockaddr *)&addr, NULL); + printf("client connected"); return 0; } |
