This commit is contained in:
Win 2024-05-14 18:34:20 +07:00
parent 85b536f929
commit 428a26017f
2 changed files with 15 additions and 0 deletions

BIN
webserver Executable file

Binary file not shown.

15
webserver.c Normal file
View File

@ -0,0 +1,15 @@
#include <arpa/inet.h>
#include <errno.h>
#include <stdio.h>
#include <sys/socket.h>
int main() {
int sockfd = socket(AF_INET, SOCK_STREAM, 0);
if(sockfd == -1) {
perror("webserve (socket)");
return 1;
}
printf("socket created successfully\n");
return 0;
}